/* =========================================================================
   Kelsey Renée Creative Studios — website styles
   Layout concept: editorial consultancy. Navy-led bands, generous cream
   space, Playfair headlines with one italic phrase, Montserrat for all
   functional text, hairline rules instead of heavy boxes.
   ========================================================================= */

:root {
  /* Brand palette (see Brand Identity Guide p.9) */
  --navy: #142B49;
  --navy-deep: #0E2038;
  --blue: #2864A0;
  --bright: #4D92C6;
  --cream: #F7F5EF;
  --cream-deep: #EFEBE1;
  --white: #FFFFFF;
  --slate: #334155;
  --muted: #5B6779;
  --teal: #5BABB2;
  --rule: #E2DDD0;
  --rule-navy: rgba(247, 245, 239, 0.16);

  /* Type */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Scale */
  --fs-display: clamp(2.35rem, 1.5rem + 3vw, 3.9rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.6rem);
  --fs-h3: 1.15rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  --wrap: 1200px;
  --gut: 16px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 24px 60px -24px rgba(14, 32, 56, 0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--slate);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
h1, h2, h3, h4 { color: var(--navy); margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.005em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h1 em, h2 em, .display em { font-style: italic; color: var(--blue); font-weight: 400; }
h3 { font-family: var(--sans); font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--white); padding: 12px 18px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gut));
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { :root { --gut: 32px; } }
@media (min-width: 1100px) { :root { --gut: 48px; } }
.band { padding-block: clamp(64px, 9vw, 120px); }
.band.tight { padding-block: clamp(48px, 6vw, 80px); }
.band.navy { background: var(--navy); color: rgba(247, 245, 239, .82); }
.band.navy h1, .band.navy h2, .band.navy h3 { color: var(--cream); }
.band.navy h1 em, .band.navy h2 em { color: var(--bright); }
.band.white { background: var(--white); }
.band.deep { background: var(--cream-deep); }
.stack > * + * { margin-top: 1.1em; }
.measure { max-width: 38rem; }
.lead { font-size: 1.125rem; line-height: 1.75; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .measure { margin-inline: auto; }

.eyebrow {
  font: 600 var(--fs-eyebrow)/1.4 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.band.navy .eyebrow { color: var(--teal); }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head.split { grid-template-columns: 1.1fr 1fr; gap: 64px; } }

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 .875rem/1 var(--sans); letter-spacing: .06em;
  padding: 17px 28px; border: 1px solid var(--navy);
  background: var(--navy); color: var(--white); text-decoration: none;
  border-radius: var(--radius); cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: var(--white); transform: translateY(-1px); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn.light { background: var(--cream); border-color: var(--cream); color: var(--navy); }
.btn.light:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn.outline-light { background: transparent; border-color: rgba(247,245,239,.5); color: var(--cream); }
.btn.outline-light:hover { border-color: var(--cream); background: rgba(247,245,239,.08); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.textlink { font: 600 .85rem/1.2 var(--sans); letter-spacing: .06em; color: var(--blue); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.textlink:hover { color: var(--navy); }
.band.navy .textlink { color: var(--bright); }

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(247, 245, 239, .94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--rule); box-shadow: 0 6px 24px -18px rgba(14,32,56,.4); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 50px; width: auto; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; align-items: center; }
.nav-links a {
  display: block; padding: 10px 12px; font: 500 .82rem/1 var(--sans); letter-spacing: .04em;
  color: var(--navy); text-decoration: none; position: relative;
}
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--blue); }
.nav-cta { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--navy);
  color: var(--navy); font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 14px; cursor: pointer; border-radius: var(--radius);
}
.menu-btn .bars { width: 18px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn .bars::before { top: 0; } .menu-btn .bars::after { top: 8px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }
.mobile-nav {
  position: fixed; inset: calc(78px + env(safe-area-inset-top, 0px)) 0 0 0; z-index: 49;
  background: var(--navy); color: var(--cream);
  padding: 32px max(var(--gut), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gut), env(safe-area-inset-left, 0px));
  overflow-y: auto; display: flex; flex-direction: column; gap: 28px;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--rule-navy); }
.mobile-nav a.m-link { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; color: var(--cream); text-decoration: none; font: 500 1.6rem/1.2 var(--serif); }
.mobile-nav a.m-link span { font: 500 .7rem var(--sans); letter-spacing: .16em; color: var(--teal); }
.mobile-nav a.m-link[aria-current="page"] { color: var(--bright); }
@media (min-width: 1080px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; padding: 14px 20px; font-size: .8rem; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* Hero ----------------------------------------------------------------- */
.hero { background: var(--navy); color: rgba(247,245,239,.84); position: relative; overflow: hidden; }
.hero::before {
  /* fine architectural grid, very faint */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(77,146,198,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(77,146,198,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
}
.hero-grid { position: relative; display: grid; gap: 56px; padding-block: clamp(56px, 8vw, 112px) clamp(64px, 8vw, 104px); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 40px; } }
.hero .eyebrow { color: var(--teal); }
.display { font-family: var(--serif); font-weight: 500; font-size: var(--fs-display); line-height: 1.04; color: var(--cream); letter-spacing: -0.01em; margin-top: 22px; }
.display span { display: block; }
.display em { color: var(--bright); }
.hero .lead { margin-top: 28px; max-width: 34rem; color: rgba(247,245,239,.8); }
.hero .btn-row { margin-top: 38px; }
.hero-note { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 10px 28px; font: 500 .72rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(247,245,239,.55); }
.hero-note span { display: inline-flex; align-items: center; gap: 10px; }
.hero-note span::before { content: ""; width: 5px; height: 5px; background: var(--teal); border-radius: 50%; }

/* Hero composition: three documents from the studio's three disciplines (built in thumbs.py) */
.compose { position: relative; container-type: inline-size; aspect-ratio: 1 / .86; width: 100%; max-width: 560px; justify-self: center; }
.compose .mini > div { transition: transform .9s var(--ease); }
@media (hover: hover) { .compose:hover .mini > div:nth-child(1) { transform: rotate(-6deg) translate(-1.5cqw, -1cqw) !important; }
  .compose:hover .mini > div:nth-child(2) { transform: rotate(4deg) translate(1.5cqw, -1.5cqw) !important; } }

/* Miniature document parts (used by hero + portfolio thumbnails) */
.mini { position: absolute; inset: 0; overflow: hidden; font-family: var(--sans); }
.m-bar { height: 4px; border-radius: 2px; background: #d9dee6; }
.m-bar.dk { background: #b9c2cf; }
.m-lines { display: grid; gap: 5px; }
.m-head { font-family: var(--serif); line-height: 1.05; }

/* Cards / lists ------------------------------------------------------- */
.practice-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 760px) { .practice-grid { grid-template-columns: repeat(3, 1fr); } }
.practice { background: var(--cream); padding: clamp(28px, 3.4vw, 44px); display: flex; flex-direction: column; gap: 16px; min-width: 0; transition: background .3s var(--ease); }
.practice:hover { background: var(--white); }
.practice .num { font: 500 .72rem var(--sans); letter-spacing: .16em; color: var(--muted); }
.practice h3 { font: 500 1.6rem/1.2 var(--serif); }
.practice ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.practice li { display: flex; gap: 10px; }
.practice li::before { content: ""; flex: 0 0 6px; height: 1px; background: var(--blue); margin-top: .8em; }
.practice .from { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.practice .from b { font: 500 1.25rem var(--serif); color: var(--navy); }
.practice .ico { width: 44px; height: 44px; color: var(--blue); }

.keepsake-strip { margin-top: 28px; display: grid; gap: 24px; align-items: center; padding: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 44px); background: var(--white); border: 1px solid var(--rule); }
@media (min-width: 860px) { .keepsake-strip { grid-template-columns: auto 1fr auto; gap: 40px; } }
.keepsake-strip .k-label { font: italic 500 1.5rem/1.2 var(--serif); color: var(--navy); }
.keepsake-strip .k-label small { display: block; font: 600 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; font-style: normal; color: var(--teal); margin-bottom: 6px; }
.keepsake-strip p { font-size: .95rem; }

/* Work grid ------------------------------------------------------------ */
.work-grid { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 700px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .work-grid.three { grid-template-columns: repeat(3, 1fr); } }
.work-card { display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; font: inherit; min-width: 0; }
.work-card[hidden] { display: none !important; }
.thumb { position: relative; container-type: inline-size; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-deep); max-width: 100%; }
.thumb .stage { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .7s var(--ease); }
.work-card:hover .thumb .stage, .work-card:focus-visible .thumb .stage { transform: scale(1.035); }
.thumb .badge { position: absolute; left: 14px; top: 14px; z-index: 2; font: 600 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; background: rgba(247,245,239,.94); color: var(--navy); padding: 7px 10px; }
.work-meta { display: flex; justify-content: space-between; gap: 16px; font: 600 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.work-meta span:last-child { color: var(--muted); font-weight: 500; }
.work-card h3 { font: 500 1.45rem/1.25 var(--serif); }
.work-card p { font-size: .92rem; color: var(--muted); }
.work-card .more { font: 600 .78rem var(--sans); letter-spacing: .06em; color: var(--navy); display: inline-flex; gap: 8px; }
.work-card:hover .more { color: var(--blue); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter { font: 600 .78rem/1 var(--sans); letter-spacing: .06em; padding: 12px 18px; border: 1px solid var(--rule); background: var(--white); color: var(--navy); cursor: pointer; border-radius: 40px; transition: all .2s var(--ease); }
.filter:hover { border-color: var(--navy); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter .ct { font-weight: 500; opacity: .6; margin-left: 4px; }

/* Who we serve */
.serve-grid { display: grid; gap: 0; border-top: 1px solid var(--rule-navy); }
@media (min-width: 640px) { .serve-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .serve-grid { grid-template-columns: repeat(4, 1fr); } }
.serve { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--rule-navy); display: grid; gap: 8px; align-content: start; min-width: 0; }
.serve h3 { font: 500 1.2rem/1.3 var(--serif); color: var(--cream); }
.serve p { font-size: .88rem; color: rgba(247,245,239,.7); }

/* Process */
.process { display: grid; gap: 0; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .process { grid-template-columns: repeat(5, 1fr); } }
.process li { position: relative; padding: 28px 22px 28px 0; border-top: 1px solid var(--navy); display: grid; gap: 10px; align-content: start; min-width: 0; }
.process li::before { counter-increment: step; content: "0" counter(step); font: 500 2.6rem/1 var(--serif); color: var(--blue); }
.process h3 { font: 600 1rem var(--sans); letter-spacing: .02em; }
.process p { font-size: .9rem; }

/* Why */
.why-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (min-width: 960px) { .why-grid { grid-template-columns: .9fr 1.1fr; } }
.why-list { display: grid; gap: 0; }
.why-item { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.why-item:first-child { border-top: 1px solid var(--rule); }
.why-item svg { width: 36px; height: 36px; color: var(--blue); }
.why-item h3 { margin-bottom: 6px; }
.why-item p { font-size: .93rem; }
.founder-note { background: var(--navy); color: rgba(247,245,239,.84); padding: clamp(32px, 4vw, 48px); position: relative; }
.founder-note blockquote { margin: 0; font: italic 400 1.45rem/1.5 var(--serif); color: var(--cream); }
.founder-note .sig { margin-top: 24px; display: flex; align-items: center; gap: 14px; font-size: .85rem; }
.founder-note .sig img { width: 52px; }
.founder-note .sig b { display: block; color: var(--cream); font-weight: 600; }

/* CTA band */
.cta-band { background: var(--blue); color: var(--white); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -120px; top: 50%; width: 420px; height: 420px; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 27px rgba(255,255,255,.14); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.4fr auto; } }
.cta-band h2 { color: var(--white); }
.cta-band h2 em { color: var(--cream); }
.cta-band p { color: rgba(255,255,255,.85); margin-top: 12px; max-width: 36rem; }
.cta-band .eyebrow { color: var(--cream); }

/* Page hero (inner pages) */
.page-hero { background: var(--navy); color: rgba(247,245,239,.8); padding-block: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.page-hero h1 { color: var(--cream); margin-top: 18px; max-width: 18ch; font-size: var(--fs-display); line-height: 1.06; }
.page-hero h1 em { color: var(--bright); }
.page-hero .lead { margin-top: 22px; max-width: 40rem; }
.page-hero .eyebrow { color: var(--teal); }
.page-hero .seal { position: absolute; right: max(var(--gut), 4vw); top: 50%; transform: translateY(-50%); width: 240px; opacity: .14; display: none; }
@media (min-width: 1000px) { .page-hero .seal { display: block; } }
.crumbs { font: 500 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(247,245,239,.5); }
.crumbs a { color: rgba(247,245,239,.7); text-decoration: none; }

/* Services page */
.svc-nav { position: sticky; top: calc(78px + env(safe-area-inset-top, 0px)); z-index: 20; background: var(--white); border-bottom: 1px solid var(--rule); }
.svc-nav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.svc-nav a { flex: 0 0 auto; padding: 18px 14px; font: 600 .78rem var(--sans); letter-spacing: .04em; color: var(--navy); text-decoration: none; border-bottom: 2px solid transparent; }
.svc-nav a:hover, .svc-nav a.on { border-color: var(--blue); color: var(--blue); }
.svc { display: grid; gap: clamp(32px, 5vw, 72px); scroll-margin-top: 150px; }
@media (min-width: 980px) { .svc { grid-template-columns: .85fr 1.15fr; } }
.svc-side { display: grid; gap: 20px; align-content: start; }
@media (min-width: 980px) { .svc-side { position: sticky; top: 160px; } }
.svc-side .letter { font: italic 400 5rem/1 var(--serif); color: var(--blue); opacity: .85; }
.svc-body { display: grid; gap: 36px; min-width: 0; }
.svc-cols { display: grid; gap: 28px; }
@media (min-width: 640px) { .svc-cols { grid-template-columns: 1fr 1fr; } }
.svc-cols h4 { font: 600 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .93rem; }
.check li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.check li::before { content: ""; width: 12px; height: 7px; border-left: 1.5px solid var(--blue); border-bottom: 1.5px solid var(--blue); transform: rotate(-45deg); margin-top: .45em; }
.price-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.price-table caption { text-align: left; font: 600 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); padding-bottom: 10px; }
.price-table td { padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.price-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; padding-left: 16px; }
.price-table td small { display: block; color: var(--muted); font-size: .8rem; }
.price-table tr:hover td { background: rgba(40,100,160,.03); }
.table-scroll { overflow-x: auto; }
.callout { background: var(--cream); border-left: 2px solid var(--teal); padding: 18px 22px; font-size: .9rem; }
.band.cream .callout, body .band:not(.white) .callout { background: var(--white); }
.svc-divider { height: 1px; background: var(--rule); border: 0; margin: clamp(56px, 7vw, 96px) 0; }

/* Pricing */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.tier-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .tier-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.tier { background: var(--white); border: 1px solid var(--rule); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 18px; position: relative; min-width: 0; }
.tier.feature { background: var(--navy); color: rgba(247,245,239,.84); border-color: var(--navy); }
.tier.feature h3, .tier.feature .amt { color: var(--cream); }
.tier .flag { position: absolute; top: -1px; right: 24px; background: var(--teal); color: var(--navy); font: 600 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 8px 12px; }
.tier h3 { font: 500 1.55rem/1.2 var(--serif); }
@media (min-width: 900px) { .tier h3 { min-height: 2.4em; } .tier .for { min-height: 4.8em; } }
.tier .for { font-size: .88rem; min-height: 3.2em; }
.tier .amt { font: 500 2.8rem/1 var(--serif); color: var(--navy); font-variant-numeric: lining-nums tabular-nums; }
.tier .amt small { font: 500 .85rem var(--sans); color: var(--muted); margin-left: 4px; }
.tier.feature .amt small { color: rgba(247,245,239,.6); }
.tier .check { padding-top: 18px; border-top: 1px solid var(--rule); }
.tier.feature .check { border-color: var(--rule-navy); }
.tier.feature .check li::before { border-color: var(--bright); }
.tier .turn { margin-top: auto; padding-top: 14px; font: 500 .8rem var(--sans); color: var(--muted); }
.tier.feature .turn { color: rgba(247,245,239,.6); }
.tier .btn { margin-top: 6px; }
.tier.feature .btn { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.price-cols { display: grid; gap: 40px 56px; }
@media (min-width: 900px) { .price-cols { grid-template-columns: 1fr 1fr; } }
.terms-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 760px) { .terms-grid { grid-template-columns: repeat(3, 1fr); } }
.terms-grid > div { background: var(--white); padding: 28px; }
.terms-grid h3 { font: 500 1.2rem var(--serif); margin-bottom: 12px; }
.terms-grid ul { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 6px; }

/* About */
.about-grid { display: grid; gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (min-width: 960px) { .about-grid { grid-template-columns: .9fr 1.1fr; } }
.portrait { position: relative; aspect-ratio: 4/5; background: linear-gradient(160deg, var(--cream-deep), #e4ddcd); display: grid; place-items: center; max-width: 100%; }
.portrait::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(20,43,73,.18); pointer-events: none; }
.portrait .ph { text-align: center; display: grid; gap: 12px; justify-items: center; color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; padding: 24px; }
.portrait .ph img { width: 110px; opacity: .5; }
.portrait-cap { margin-top: 14px; font-size: .8rem; color: var(--muted); }
.creds { display: grid; gap: 0; margin-top: 8px; }
.creds div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: .93rem; }
.creds dt, .creds .k { font: 600 .7rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
@media (max-width: 520px) { .creds div { grid-template-columns: 1fr; gap: 4px; } }
.pillars { display: grid; gap: 1px; background: var(--rule-navy); border-top: 1px solid var(--rule-navy); border-bottom: 1px solid var(--rule-navy); }
@media (min-width: 800px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--navy); padding: 36px 32px 36px 0; display: grid; gap: 12px; align-content: start; }
@media (min-width: 800px) { .pillar { padding: 40px 32px; } .pillar:first-child { padding-left: 0; } }
.pillar .k { font: italic 400 2.4rem/1 var(--serif); color: var(--bright); }
.pillar h3 { color: var(--cream); font: 500 1.35rem var(--serif); }
.pillar p { font-size: .92rem; }
.values { display: grid; gap: 28px; }
@media (min-width: 760px) { .values { grid-template-columns: repeat(2, 1fr); gap: 40px 56px; } }
.values h3 { font: 500 1.3rem var(--serif); margin-bottom: 8px; display: flex; gap: 14px; align-items: baseline; }
.values h3 span { font: 600 .7rem var(--sans); letter-spacing: .14em; color: var(--teal); }

/* Contact */
.contact-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (min-width: 980px) { .contact-grid { grid-template-columns: .8fr 1.2fr; } }
.form { background: var(--white); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--rule); display: grid; gap: 22px; min-width: 0; }
.form-row { display: grid; gap: 22px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.field label .opt { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.5 var(--sans); color: var(--navy); background: var(--cream);
  border: 1px solid transparent; border-bottom: 1px solid #c9c2b2; padding: 14px 14px; border-radius: 0;
  transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--blue); }
.field .err { font-size: .8rem; color: #A13A2F; min-height: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #A13A2F; background: #fdf6f4; }
.form .fine { font-size: .8rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.confirm { background: var(--white); border: 1px solid var(--rule); padding: clamp(32px, 5vw, 56px); display: grid; gap: 16px; justify-items: start; }
.confirm .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.confirm .tick svg { width: 24px; color: var(--cream); }
.confirm h2 { font-size: 2rem; }
.preview-note { background: #FFF8E6; border: 1px solid #EBD9A6; color: #5c4a14; padding: 14px 16px; font-size: .84rem; width: 100%; }
.contact-aside { display: grid; gap: 32px; }
.contact-aside .item { display: grid; gap: 6px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.contact-aside .item h3 { font: 500 1.2rem var(--serif); }
.contact-aside .item p { font-size: .92rem; }
.expect { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: ex; }
.expect li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; font-size: .92rem; }
.expect li::before { counter-increment: ex; content: counter(ex); width: 28px; height: 28px; border: 1px solid var(--blue); color: var(--blue); border-radius: 50%; display: grid; place-items: center; font: 600 .75rem var(--sans); }

/* FAQ */
.faq { max-width: 860px; }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group > h2 { font-size: 1.6rem; margin-bottom: 16px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative; font: 600 1rem/1.5 var(--sans); color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid var(--blue); border-bottom: 1.5px solid var(--blue); transform: translateY(-75%) rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq .ans { padding: 0 0 24px; max-width: 46rem; font-size: .95rem; }
.faq .ans p + p { margin-top: .8em; }

/* Legal pages */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; }
.legal h3 { margin: 1.6em 0 .4em; }
.legal p, .legal li { font-size: .97rem; }
.legal p + p { margin-top: .9em; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; margin: .8em 0; }
.template-banner { background: #FFF8E6; border: 1px solid #EBD9A6; color: #5c4a14; padding: 18px 20px; font-size: .9rem; margin-bottom: 40px; }
.template-banner b { color: #3d300a; }
.ph-token { background: rgba(77,146,198,.14); color: var(--navy); padding: 0 4px; font-weight: 600; }

/* Footer --------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(247,245,239,.66); font-size: .9rem; padding-block: 72px calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; } }
.foot-brand img { width: 250px; max-width: 100%; }
.foot-brand p { margin-top: 20px; max-width: 22rem; }
.site-footer h4 { font: 600 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(247,245,239,.82); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a { width: 40px; height: 40px; border: 1px solid var(--rule-navy); display: grid; place-items: center; border-radius: 50%; transition: border-color .2s, background .2s; }
.social a:hover { border-color: var(--bright); background: rgba(77,146,198,.12); }
.social svg { width: 16px; height: 16px; color: var(--cream); }
.foot-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule-navy); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: .78rem; color: rgba(247,245,239,.5); }

/* Case study dialog ----------------------------------------------------- */
dialog.case { border: 0; padding: 0; width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--cream); color: var(--slate); box-shadow: var(--shadow); }
dialog.case::backdrop { background: rgba(14, 32, 56, .72); backdrop-filter: blur(3px); }
.case-inner { display: grid; }
@media (min-width: 900px) { .case-inner { grid-template-columns: 1fr 1fr; } }
.case-visual { position: relative; container-type: inline-size; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-deep); max-width: 100%; }
@media (min-width: 900px) { .case-visual { position: sticky; top: 0; align-self: start; } .case-inner { align-items: start; } }
.case-body { padding: clamp(28px, 4vw, 48px); display: grid; gap: 22px; align-content: start; min-width: 0; }
.case-body h2 { font-size: 2rem; }
.case-body h4 { font: 600 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.case-body p, .case-body li { font-size: .93rem; }
.case-body ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.case-close { position: absolute; right: 12px; top: 12px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: var(--cream); font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.concept-tag { display: inline-flex; align-items: center; gap: 8px; font: 600 .66rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--navy); background: rgba(91,171,178,.18); padding: 8px 12px; justify-self: start; }

/* Reveal motion: visible at rest, gently animates when JS adds .in */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.pending { opacity: 0; transform: translateY(18px); }

.roman { font: italic 400 2.2rem/1 var(--serif); color: var(--blue); }

.portrait.photo { margin: 0; background: var(--cream-deep); }
.portrait.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait.photo::after { border-color: rgba(247,245,239,.55); z-index: 1; }

.foot-email { margin-top: 18px; font-weight: 500; }
.foot-email a { color: var(--cream); border-bottom: 1px solid rgba(77,146,198,.6); padding-bottom: 2px; }
