/*
 * VITRAZH 2.0
 * Final override layer. Loaded after all legacy styles so the new system
 * cannot be accidentally overwritten by older mockup rules.
 * Content is intentionally untouched.
 */

:root {
  --vit-navy: #192c3b;
  --vit-burgundy: #340910;
  --vit-ivory: #f3eee4;
  --vit-cream: #f2eddc;
  --vit-slate: #252c34;
  --vit-black: #1b1c1d;
  --vit-line: rgba(25, 44, 59, .23);
  --vit-paper: rgba(243, 238, 228, .88);
  --vit-system: "Manrope", Arial, sans-serif;
  --vit-editorial: "Cormorant Garamond", Georgia, serif;
  --vit-display: "Vitrazh Display", "Bodoni Moda", Didot, serif;
}

html { background: var(--vit-ivory); }

body {
  color: var(--vit-black);
  background:
    radial-gradient(circle at 87% 11%, rgba(52, 9, 16, .035), transparent 20rem),
    linear-gradient(115deg, rgba(25, 44, 59, .025), transparent 38%),
    var(--vit-ivory);
  font-family: var(--vit-system);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

img { display: block; }

h1, h2, h3,
.display, .display-title, .section-title,
[class*="__title"], [class*="-title"] {
  font-family: var(--vit-display);
  font-weight: 400;
  letter-spacing: -.035em;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

.eyebrow, .kicker, .label, .meta, .micro,
[class*="eyebrow"], [class*="kicker"], [class*="label"], [class*="meta"] {
  font-family: var(--vit-system);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: clamp(.62rem, .72vw, .76rem);
}

/* Navigation — editorial masthead */
.site-header, .topbar, header[role="banner"] {
  background: rgba(243, 238, 228, .93);
  border-color: var(--vit-line);
  backdrop-filter: none;
}

.site-header a, .topbar a, header[role="banner"] a {
  color: var(--vit-navy);
}

/* Editorial hero: photograph, type and planes form one composition. */
.hero, .hero-section, [class*="hero"] {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--vit-ivory);
}

.hero::before, .hero-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(12rem, 24vw, 27rem);
  aspect-ratio: 1;
  right: -5vw;
  top: 10%;
  border: 1px solid rgba(25, 44, 59, .35);
  border-radius: 50%;
}

.hero::after, .hero-section::after {
  content: "+   VISUAL IDENTITY / 2026";
  position: absolute;
  z-index: 3;
  right: clamp(1rem, 4vw, 4.5rem);
  bottom: clamp(1rem, 3vw, 3rem);
  color: var(--vit-ivory);
  font: 500 .62rem/1.3 var(--vit-system);
  letter-spacing: .18em;
}

.hero h1, .hero-section h1,
.hero .display, .hero-section .display {
  position: relative;
  z-index: 3;
  color: var(--vit-navy);
  font-size: clamp(4.5rem, 9.2vw, 10.8rem);
  line-height: .78;
  letter-spacing: -.06em;
  max-width: 10ch;
}

.hero img, .hero-section img,
.hero picture, .hero-section picture,
.hero-media, .hero-image {
  position: relative;
  z-index: 1;
}

.hero-media, .hero-image, .hero figure {
  overflow: hidden;
  background: var(--vit-navy);
}

.hero-media::before, .hero-image::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 22%;
  background: rgba(25, 44, 59, .22);
  border-right: 1px solid rgba(243, 238, 228, .55);
  pointer-events: none;
}

.hero-media::after, .hero-image::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: clamp(5rem, 11vw, 10rem);
  aspect-ratio: 1;
  right: 7%;
  top: 8%;
  border-radius: 50%;
  background: rgba(52, 9, 16, .68);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Shared section rhythm */
main > section, .section {
  position: relative;
  border-color: var(--vit-line);
}

main > section:nth-of-type(3n + 1) { background-color: var(--vit-ivory); }
main > section:nth-of-type(3n + 2) { background-color: var(--vit-cream); }

.section-heading, .section-head, [class*="section-heading"] {
  position: relative;
  z-index: 2;
}

.section-heading h2, .section-head h2,
section > h2, section h2.section-title {
  color: var(--vit-navy);
  font-size: clamp(3rem, 6.2vw, 7rem);
  line-height: .88;
}

.section-heading::before, .section-head::before {
  content: "STUDY / VISUAL IDENTITY";
  display: block;
  margin-bottom: 1rem;
  color: var(--vit-burgundy);
  font: 600 .62rem/1.2 var(--vit-system);
  letter-spacing: .18em;
}

/* Layered story blocks */
.diagnosis, .problem, .story, .about,
[class*="diagnos"], [class*="story"] {
  isolation: isolate;
}

.diagnosis img, .problem img, .story img, .about img {
  outline: 1px solid rgba(25, 44, 59, .18);
  outline-offset: -1px;
}

.diagnosis::after, .problem::after, .story::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(32vw, 27rem);
  height: min(15vw, 11rem);
  right: 0;
  bottom: 9%;
  background: rgba(52, 9, 16, .1);
  border: 1px solid rgba(52, 9, 16, .22);
  pointer-events: none;
}

/* Quiet pages */
.formula, .result, .outcome, .promise,
[class*="formula"], [class*="outcome"] {
  background: var(--vit-ivory) !important;
  color: var(--vit-navy);
}

.formula h2, .result h2, .outcome h2, .promise h2 {
  max-width: 13ch;
}

/* Dark statements */
.principle, .method, .process, .fit, .cost,
[class*="principle"], [class*="method"], [class*="process"] {
  background: var(--vit-navy) !important;
  color: var(--vit-ivory);
}

.principle h2, .method h2, .process h2, .fit h2, .cost h2,
.principle h3, .method h3, .process h3, .fit h3, .cost h3 {
  color: var(--vit-ivory);
}

.principle a, .method a, .process a, .fit a, .cost a {
  color: var(--vit-ivory);
}

.principle::before, .method::before, .process::before, .fit::before {
  content: "";
  position: absolute;
  width: clamp(9rem, 19vw, 19rem);
  aspect-ratio: 1;
  left: -5rem;
  bottom: -7rem;
  border: 1px solid rgba(243, 238, 228, .26);
  border-radius: 50%;
}

/* Cards behave like editorial planes, not UI glass. */
.card, [class*="card"], .phase, .step, .tariff, .package {
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-color: var(--vit-line) !important;
}

.phase, .step, [class*="phase"], [class*="step"] {
  position: relative;
}

.phase::before, .step::before {
  color: var(--vit-burgundy);
}

/* Main package: navy field with one burgundy accent, never a burgundy wall. */
.package-featured, .tariff-featured, .main-package,
[class*="package--featured"], [class*="tariff--featured"] {
  position: relative;
  overflow: hidden;
  background: var(--vit-navy) !important;
  color: var(--vit-ivory) !important;
}

.package-featured::after, .tariff-featured::after, .main-package::after {
  content: "";
  position: absolute;
  width: clamp(7rem, 13vw, 12rem);
  aspect-ratio: 1;
  right: -3rem;
  top: -3rem;
  border-radius: 50%;
  background: var(--vit-burgundy);
  opacity: .88;
}

.package-featured *, .tariff-featured *, .main-package * {
  position: relative;
  z-index: 1;
}

.package-note, .tariff-note, [class*="package-note"], [class*="tariff-note"] {
  display: block;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid currentColor;
  background: rgba(243, 238, 228, .06);
}

/* Portfolio is the intentional collage climax. */
.portfolio, [class*="portfolio"] {
  position: relative;
  isolation: isolate;
}

.portfolio img, [class*="portfolio"] img {
  border-radius: 0 !important;
}

.portfolio figure:nth-of-type(even),
[class*="portfolio"] figure:nth-of-type(even) {
  transform: translateY(clamp(0rem, 2vw, 2rem));
}

/* FAQ: visual rest. */
.faq, [class*="faq"] {
  background: var(--vit-ivory) !important;
}

.faq details, [class*="faq"] details {
  border-radius: 0;
  border-width: 0 0 1px;
  border-color: var(--vit-line);
  background: transparent;
}

/* Contact and design-system transition */
.contact, [class*="contact"] {
  background: var(--vit-cream) !important;
}

.design-system, .design-system-cta, .system-cta,
[class*="design-system"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--vit-slate) !important;
  color: var(--vit-ivory) !important;
}

.design-system h2, .design-system-cta h2, .system-cta h2,
[class*="design-system"] h2 {
  color: var(--vit-ivory) !important;
  font-size: clamp(3.25rem, 7vw, 8rem);
  line-height: .82;
}

.design-system::before, .design-system-cta::before, .system-cta::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 11% 7% auto auto;
  width: clamp(9rem, 22vw, 23rem);
  aspect-ratio: 1;
  border: 1px solid rgba(243, 238, 228, .38);
  border-radius: 50%;
}

.design-system::after, .design-system-cta::after, .system-cta::after {
  content: "ai_iz_serdca  /  VISUAL NOTE 004";
  position: absolute;
  z-index: 2;
  right: 4vw;
  bottom: 2rem;
  font: 500 .62rem/1.2 var(--vit-system);
  letter-spacing: .18em;
}

.design-system > *, .design-system-cta > *, .system-cta > *,
[class*="design-system"] > * {
  position: relative;
  z-index: 1;
}

/* Buttons: print-like labels instead of rounded interface pills. */
.button, .btn, a[class*="button"], a[class*="btn"] {
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--vit-system);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* Prevent display letters from being clipped or colliding. */
h1, h2, h3, .display, .display-title, .section-title,
[class*="__title"], [class*="-title"] {
  overflow: visible;
  padding-top: .08em;
  padding-bottom: .12em;
}

@media (max-width: 900px) {
  .hero h1, .hero-section h1, .hero .display, .hero-section .display {
    font-size: clamp(3.8rem, 15vw, 7rem);
    line-height: .82;
    max-width: 9ch;
  }

  .section-heading h2, .section-head h2,
  section > h2, section h2.section-title {
    font-size: clamp(2.8rem, 11vw, 5.4rem);
    line-height: .9;
  }

  .hero::before, .hero-section::before { right: -8rem; }
  .portfolio figure:nth-of-type(even),
  [class*="portfolio"] figure:nth-of-type(even) { transform: none; }
}

@media (max-width: 600px) {
  body::before { opacity: .035; }

  h1, h2, h3, .display, .display-title, .section-title,
  [class*="__title"], [class*="-title"] {
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .hero h1, .hero-section h1, .hero .display, .hero-section .display {
    font-size: clamp(3.25rem, 16vw, 5.25rem);
    line-height: .84;
  }

  .hero::after, .hero-section::after,
  .design-system::after, .design-system-cta::after, .system-cta::after {
    right: 1rem;
    bottom: .85rem;
    font-size: .52rem;
  }

  .hero-media::after, .hero-image::after {
    width: 5.5rem;
    right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   OCTOBER VISUAL REVIEW — precise fixes for the actual layout
   ========================================================= */

/* “Что меняется с системой”: visible numerals and a calm centre axis. */
.cost-list article {
  display: flex !important;
  min-height: 230px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 34px 34px 40px !important;
  text-align: center;
}

.cost-list article > span {
  display: grid !important;
  width: 46px;
  height: 46px;
  margin: 0 !important;
  place-items: center;
  border: 1px solid rgba(243, 238, 228, .42);
  color: #f0d2a5 !important;
  font: 500 15px/1 var(--vit-system) !important;
  letter-spacing: .12em;
}

.cost-list article > p {
  max-width: 340px;
  margin: 0 auto !important;
  color: rgba(243, 238, 228, .82) !important;
}

/* The large pale labels get their own column instead of colliding with titles. */
.package-section .split-intro,
.tariffs-section .split-intro {
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr) minmax(300px, .66fr) !important;
  gap: clamp(38px, 4.5vw, 76px) !important;
  align-items: start !important;
}

.package-section .split-intro > .kicker,
.tariffs-section .split-intro > .kicker {
  width: 100%;
  max-width: 230px;
  margin: 8px 0 0 !important;
  font-size: clamp(52px, 4.3vw, 70px) !important;
  line-height: .84 !important;
  letter-spacing: -.055em !important;
  overflow-wrap: normal;
}

.package-section .split-intro > h2,
.tariffs-section .split-intro > h2 {
  max-width: 700px;
  margin: 0 !important;
}

.package-section .split-intro > p:last-child,
.tariffs-section .split-intro > p:last-child {
  margin-top: 44px !important;
}

.package-card {
  position: relative;
  z-index: 2;
  margin-top: 64px !important;
}

/* Compact tariffs: readable copy on every card, including the second card. */
.tariff-example-copy,
.tariff-environment .tariff-example-copy {
  color: var(--vit-navy) !important;
  background: rgba(243, 238, 228, .96) !important;
}

.tariff-example-copy > p,
.tariff-example-copy ul,
.tariff-example-copy li,
.tariff-environment .tariff-example-copy > p,
.tariff-environment .tariff-example-copy ul,
.tariff-environment .tariff-example-copy li {
  color: #4b575e !important;
  opacity: 1 !important;
}

.tariff-example-copy li {
  border-color: rgba(25, 44, 59, .22) !important;
}

.tariff-example-copy a {
  color: var(--vit-burgundy) !important;
  border-color: var(--vit-burgundy) !important;
}

/* Portfolio introduction: the title and explanation now breathe separately. */
.portfolio-head {
  display: grid !important;
  grid-template-columns: minmax(220px, .5fr) minmax(500px, 1.15fr) minmax(280px, .62fr) !important;
  column-gap: clamp(38px, 5vw, 86px) !important;
  align-items: start !important;
  padding: 110px 4vw 130px !important;
}

.portfolio-head > .kicker {
  grid-column: 1;
  margin: 0 !important;
  max-width: 300px;
  font-size: clamp(52px, 4.8vw, 76px) !important;
  line-height: .86 !important;
}

.portfolio-head > h2 {
  grid-column: 2;
  margin: 76px 0 0 !important;
  max-width: 720px;
}

.portfolio-head > p:last-child {
  grid-column: 3;
  margin: 166px 0 0 !important;
  padding: 26px 26px 28px;
  border: 1px solid rgba(25, 44, 59, .25);
  border-left: 3px solid var(--vit-burgundy);
  background: rgba(243, 238, 228, .72);
  color: #536067;
  font-size: 14px;
  line-height: 1.78;
}

/* The former corner rectangles covered faces and products; remove them. */
.portfolio-project::after,
.portfolio-card::after {
  content: none !important;
  display: none !important;
}

/* Portfolio becomes an editorial spread instead of photos placed in frames. */
.portfolio-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: clamp(76px, 8vw, 128px) 24px !important;
  align-items: start;
}

.portfolio-card {
  grid-column: span 6;
  display: grid !important;
  grid-template-rows: auto auto;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  transform: none !important;
}

.portfolio-card-wide {
  grid-column: 1 / -1;
}

.portfolio-images,
.portfolio-card .portfolio-images {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.portfolio-images img,
.portfolio-card .portfolio-images img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
}

.portfolio-card:nth-child(3) .portfolio-images img {
  object-position: center 28% !important;
}

.jewelry-card .portfolio-images,
.jewelry-images {
  background: var(--vit-black) !important;
}

.jewelry-card .portfolio-images img,
.jewelry-images img {
  object-fit: contain !important;
}

.portfolio-card-wide .portfolio-images {
  aspect-ratio: 21 / 9;
}

.portfolio-card > div:last-child {
  display: grid !important;
  grid-template-columns: 64px minmax(180px, .8fr) minmax(220px, 1.2fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(25, 44, 59, .22) !important;
  background: transparent !important;
}

.portfolio-card > div:last-child > span {
  grid-column: 1;
  margin-top: 7px;
}

.portfolio-card > div:last-child > h3 {
  grid-column: 2;
  margin: 0 !important;
  font-size: clamp(42px, 4vw, 64px) !important;
}

.portfolio-card > div:last-child > p {
  grid-column: 3;
  margin: 8px 0 0 !important;
  color: #5a666d !important;
  line-height: 1.72;
}

.jewelry-card > div:last-child {
  padding: 26px 24px 30px !important;
  border-top-color: rgba(243, 238, 228, .22) !important;
  background: var(--vit-navy) !important;
}

.jewelry-card > div:last-child > p {
  color: rgba(243, 238, 228, .74) !important;
}

/* FAQ colour hierarchy requested in the review. */
.faq-head .faq-blue {
  color: #0e5f93;
}

.faq-head h2 em {
  color: var(--vit-black) !important;
}

/* The handoff now explains the real path: test → Anti-Pinterest → signature. */
.design-system-cta {
  grid-template-columns: minmax(160px, .35fr) minmax(0, 1.45fr) minmax(240px, .55fr) !important;
  min-height: 680px;
  padding-top: 92px !important;
  padding-bottom: 92px !important;
}

.design-system-copy h2 {
  max-width: 900px !important;
}

.design-system-copy > p {
  max-width: 860px !important;
}

.entry-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
  border: 1px solid rgba(243, 238, 228, .2);
}

.entry-path article {
  min-height: 190px;
  padding: 24px;
  border-right: 1px solid rgba(243, 238, 228, .2);
}

.entry-path article:last-child { border-right: 0; }

.entry-path span {
  display: block;
  margin-bottom: 24px;
  color: #d5b078;
  font: 600 9px/1.4 var(--vit-system);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.entry-path b {
  display: block;
  color: var(--vit-ivory);
  font: 400 28px/1.02 var(--vit-editorial);
}

.entry-path p {
  margin: 16px 0 0;
  color: rgba(243, 238, 228, .66) !important;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .package-section .split-intro,
  .tariffs-section .split-intro {
    grid-template-columns: minmax(180px, .34fr) minmax(0, 1fr) minmax(250px, .6fr) !important;
    gap: 30px !important;
  }

  .portfolio-head {
    grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr) minmax(250px, .58fr) !important;
    gap: 32px !important;
  }

  .portfolio-head > p:last-child { margin-top: 130px !important; }
  .portfolio-card > div:last-child { grid-template-columns: 52px 1fr; }
  .portfolio-card > div:last-child > p { grid-column: 2; }
}

@media (max-width: 900px) {
  .cost-list { grid-template-columns: 1fr !important; }
  .cost-list article { min-height: 0; border-right: 0 !important; border-bottom: 1px solid rgba(243, 238, 228, .18); }

  .package-section .split-intro,
  .tariffs-section .split-intro,
  .portfolio-head {
    grid-template-columns: 1fr !important;
  }

  .package-section .split-intro > .kicker,
  .tariffs-section .split-intro > .kicker {
    max-width: 520px;
  }

  .package-section .split-intro > p:last-child,
  .tariffs-section .split-intro > p:last-child,
  .portfolio-head > h2,
  .portfolio-head > p:last-child {
    grid-column: 1;
    margin-top: 0 !important;
  }

  .portfolio-head { padding: 84px 4vw 92px !important; }
  .portfolio-head > p:last-child { max-width: 720px; }
  .portfolio-grid { gap: 72px 18px !important; }
  .entry-path { grid-template-columns: 1fr; }
  .entry-path article { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(243, 238, 228, .2); }
  .entry-path article:last-child { border-bottom: 0; }
}

@media (max-width: 700px) {
  .portfolio-grid {
    display: flex !important;
    gap: 18px !important;
    margin-right: -20px;
    padding: 0 20px 26px 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }

  .portfolio-card,
  .portfolio-card-wide {
    flex: 0 0 min(86vw, 520px);
    scroll-snap-align: start;
  }

  .portfolio-images,
  .portfolio-card .portfolio-images,
  .portfolio-card-wide .portfolio-images {
    aspect-ratio: 4 / 5;
  }

  .portfolio-card > div:last-child {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .portfolio-card > div:last-child > p { grid-column: 1 / -1; }
  .design-system-cta { min-height: auto; }
}
