/* ============================================================
   MARTIN SUMICHRAST — Official Site
   Design system. Edit brand-level values in :root below.
   ============================================================ */

:root {
  /* ---- CONTACT (edit once, wired everywhere by site.js) ---- */
  --email: "office@martinsumichrast.com";

  /* ---- PALETTE ---- */
  --charcoal:   #14171c;   /* primary dark base */
  --charcoal-2: #1c2027;   /* raised dark surface */
  --navy:       #0f1b2d;   /* deep navy accent ground */
  --navy-2:     #16263d;
  --ink:        #0a0c10;   /* near-black for text on light */
  --paper:      #ffffff;
  --bone:       #f6f4ef;   /* light section ground */
  --bone-2:     #ece8e0;
  --gray:       #8a8f98;   /* muted text */
  --gray-line:  #d9d5cc;   /* hairline on light */
  --gray-line-d:#2a2f38;   /* hairline on dark */
  --gold:       #b08d57;   /* metallic gold accent */
  --gold-2:     #caa46a;
  --gold-soft:  rgba(176,141,87,.12);

  /* ---- TYPE ---- */
  --display: "Canela", "Editorial New", "Playfair Display", Georgia, serif;
  --body: "Inter", "Geist", system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Canela is licensed; fall back gracefully to Playfair Display (loaded)
   so the editorial feel holds without the paid face. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--body);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 1.2rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); display: inline-block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 130px); }
.section--dark { background: var(--charcoal); color: var(--bone); }
.section--navy { background: var(--navy); color: var(--bone); }
.section--bone { background: var(--bone); }
.section--dark .eyebrow, .section--navy .eyebrow { color: var(--gold-2); }
.section--dark .eyebrow::before, .section--navy .eyebrow::before { background: var(--gold-2); }

.lead { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.5; color: #44474d; max-width: 40ch; }
.section--dark .lead, .section--navy .lead { color: #c7cad0; }
.muted { color: var(--gray); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--body); font-size: .92rem; font-weight: 600;
  letter-spacing: .02em;
  padding: 16px 30px; min-height: 44px;
  border: 1px solid transparent; cursor: pointer;
  transition: all .35s var(--ease);
  border-radius: 2px;
}
.btn--gold { background: var(--gold); color: #1a140b; }
.btn--gold:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn--outline { border-color: currentColor; color: inherit; background: transparent; }
.btn--outline:hover { background: rgba(255,255,255,.06); transform: translateY(-2px); }
.section--bone .btn--outline:hover, body > .btn--outline:hover { background: rgba(0,0,0,.04); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--navy); transform: translateY(-2px); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
/* legibility scrim for white nav text over any page top (incl. light interiors) */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,12,16,.55), rgba(10,12,16,0));
  transition: opacity .4s var(--ease);
}
.nav.scrolled::before { opacity: 0; }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { font-family: var(--display); font-size: 1.35rem; letter-spacing: .01em; color: #fff; white-space: nowrap; }
.nav__brand b { font-weight: 400; }
.nav__brand .dot { color: var(--gold); }
.nav.scrolled { background: rgba(20,23,28,.92); backdrop-filter: blur(14px); border-bottom-color: var(--gray-line-d); }
.nav.scrolled .nav__brand { color: #fff; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a, .nav__item > button {
  font-family: var(--body); font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.82);
  padding: 10px 16px; background: none; border: 0; cursor: pointer; letter-spacing: .01em;
  transition: color .25s; display: inline-flex; align-items: center; gap: .4em;
}
.nav__links a:hover, .nav__item > button:hover { color: #fff; }
.nav__links a.active { color: var(--gold-2); }
.nav__cta { margin-left: 10px; }
.nav__cta.btn { padding: 11px 22px; }

/* dropdown */
.nav__item { position: relative; }
.nav__item > button .chev { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s; }
.nav__item.open > button .chev { transform: rotate(-135deg) translateY(-1px); }
.nav__drop {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--charcoal-2); border: 1px solid var(--gray-line-d); border-radius: 4px;
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .28s var(--ease); box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.nav__item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px; } /* hover bridge */
.nav__item.open .nav__drop { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__drop a { display: block; padding: 11px 14px; border-radius: 3px; color: rgba(255,255,255,.78); font-size: .88rem; }
.nav__drop a:hover { background: var(--gold-soft); color: #fff; }

.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* mobile drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(86vw, 380px); z-index: 200;
  background: var(--charcoal); border-left: 1px solid var(--gray-line-d);
  transform: translateX(100%); transition: transform .4s var(--ease);
  padding: 28px 26px; overflow-y: auto; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer__x { align-self: flex-end; background: none; border: 0; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.drawer a { color: rgba(255,255,255,.85); padding: 14px 0; border-bottom: 1px solid var(--gray-line-d); font-size: 1.05rem; display: block; }
.drawer__sub a { padding: 10px 0 10px 18px; font-size: .95rem; color: rgba(255,255,255,.65); border: 0; }
.drawer__group > button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--gray-line-d); color: #fff; font-family: var(--body); font-size: 1.05rem; padding: 14px 0; cursor: pointer; display: flex; justify-content: space-between; }
.drawer__sub { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.drawer__group.open .drawer__sub { max-height: 600px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 150; opacity: 0; visibility: hidden; transition: .35s; }
.scrim.open { opacity: 1; visibility: visible; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--charcoal); }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .42; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(15,27,45,.55) 0%, rgba(20,23,28,.45) 40%, rgba(20,23,28,.96) 100%),
  radial-gradient(120% 80% at 80% 0%, rgba(176,141,87,.18), transparent 60%); }
.hero__grid { position: absolute; inset: 0; z-index: 1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut) clamp(56px, 9vw, 110px); }
.hero h1 { max-width: 18ch; }
.hero h1 .gold { color: var(--gold-2); font-style: italic; }
.hero__sub { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: #cfd3da; max-width: 56ch; margin: 26px 0 36px; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll { position: absolute; bottom: 26px; right: var(--gut); z-index: 2; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); writing-mode: vertical-rl; }

/* stat band */
.stats { background: var(--navy); border-top: 1px solid var(--gray-line-d); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 40px var(--gut); border-right: 1px solid rgba(255,255,255,.08); color: var(--bone); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.2rem); color: #fff; line-height: 1; }
.stat__num .gold { color: var(--gold-2); }
.stat__label { font-size: .82rem; letter-spacing: .04em; color: #aeb4bf; margin-top: 10px; }

/* ============================================================
   GENERIC LAYOUT PIECES
   ============================================================ */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; border-radius: 4px; }
.split__media .tag { position: absolute; bottom: 18px; left: 18px; background: var(--charcoal); color: var(--bone); padding: 10px 16px; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; border-left: 2px solid var(--gold); }

.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--gray-line-d); border: 1px solid var(--gray-line-d); }
.section--bone .expertise-grid { background: var(--gray-line); border-color: var(--gray-line); }
.xcard { background: var(--charcoal); padding: 34px 30px; transition: background .35s; min-height: 180px; }
.section--bone .xcard { background: var(--bone); }
.xcard:hover { background: var(--charcoal-2); }
.section--bone .xcard:hover { background: var(--paper); }
.xcard__n { font-family: var(--display); font-size: .95rem; color: var(--gold); margin-bottom: 18px; }
.xcard h3 { font-size: 1.25rem; margin-bottom: 10px; }
.xcard p { font-size: .92rem; color: var(--gray); margin: 0; }
.section--bone .xcard p { color: #5c6068; }

/* cards row */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { border: 1px solid var(--gray-line); border-radius: 4px; overflow: hidden; background: var(--paper); transition: transform .4s var(--ease), box-shadow .4s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(15,27,45,.12); }
.card__media { aspect-ratio: 16/10; overflow: hidden; background: var(--charcoal); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 26px 26px 30px; flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: 10px; }
.card__body p { font-size: .94rem; color: #5c6068; flex: 1; }
.card__link { margin-top: 16px; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); display: inline-flex; gap: .5em; }

/* timeline */
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,.16); }
.tl-item { position: relative; padding: 0 0 8px 60px; margin-bottom: 8px; }
.tl-item__dot { position: absolute; left: 11px; top: 22px; width: 15px; height: 15px; border-radius: 50%; background: var(--charcoal); border: 2px solid var(--gold); }
.tl-item__head { width: 100%; text-align: left; background: var(--charcoal-2); border: 1px solid var(--gray-line-d); border-radius: 4px; padding: 22px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; transition: border-color .3s; color: var(--bone); font-family: inherit; }
.tl-item__head:hover { border-color: var(--gold); }
.tl-item__yr { font-family: var(--display); color: var(--gold-2); font-size: 1rem; }
.tl-item__ttl { font-family: var(--display); font-size: 1.3rem; color: #fff; flex: 1; }
.tl-item__body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.tl-item.open .tl-item__body { max-height: 400px; }
.tl-item__body p { padding: 18px 24px 6px; color: #b9bdc6; font-size: .95rem; margin: 0; }
.tl-item__plus { font-size: 1.6rem; color: var(--gold-2); line-height: 1; transition: transform .3s; }
.tl-item.open .tl-item__plus { transform: rotate(45deg); }

/* philosophy / value list */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--gray-line-d); border: 1px solid var(--gray-line-d); }
.value { background: var(--charcoal); padding: 38px 34px; }
.value h3 { font-size: 1.3rem; margin-bottom: 12px; color: #fff; }
.value p { color: #b3b8c1; font-size: .95rem; margin: 0; }
.value__n { font-family: var(--display); color: var(--gold); font-size: 1.1rem; display: block; margin-bottom: 16px; }

/* media / video */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.video { border: 1px solid var(--gray-line); border-radius: 4px; overflow: hidden; background: var(--paper); }
.video__frame { aspect-ratio: 16/9; background: #000; }
.video__frame iframe { width: 100%; height: 100%; border: 0; }
.video__body { padding: 24px 26px 28px; }
.video__body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.video__body p { font-size: .92rem; color: #5c6068; margin: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--gray-line); }
.section--dark .faq__item { border-color: var(--gray-line-d); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: 26px 0; font-family: var(--display); font-size: clamp(1.1rem, 1.7vw, 1.4rem); cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; color: inherit; }
.faq__plus { color: var(--gold); font-size: 1.5rem; line-height: 1; transition: transform .3s; flex-shrink: 0; }
.faq__item.open .faq__plus { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq__item.open .faq__a { max-height: 500px; }
.faq__a p { padding: 0 0 26px; color: #5c6068; margin: 0; max-width: 68ch; }
.section--dark .faq__a p { color: #b3b8c1; }

/* form */
.formcard { background: var(--charcoal-2); border: 1px solid var(--gray-line-d); border-radius: 6px; padding: clamp(28px, 4vw, 48px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; background: var(--charcoal); border: 1px solid var(--gray-line-d);
  color: #fff; font-family: var(--body); font-size: .98rem; border-radius: 3px; transition: border-color .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .82rem; color: var(--gray); margin-top: 14px; }
.form-status { margin-top: 16px; font-size: .95rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--gold-2); }
.form-status.err { color: #e0746b; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 16ch; margin: 0 auto 22px; }
.cta-band .hero__cta { justify-content: center; }

/* breadcrumb */
.crumbs { font-size: .8rem; color: var(--gray); padding-top: 110px; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* page hero (interior) */
.phero { background: var(--charcoal); color: #fff; padding: 130px var(--gut) clamp(50px, 7vw, 90px); position: relative; overflow: hidden; }
.phero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(100% 120% at 90% 0%, rgba(176,141,87,.16), transparent 55%); }
.phero__inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.phero h1 { max-width: 20ch; }
.phero p { color: #c7cad0; max-width: 60ch; margin-top: 20px; font-size: 1.1rem; }

/* prose (articles / glossary) */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin: 1.6em 0 .5em; }
.prose h3 { margin: 1.4em 0 .4em; }
.prose p, .prose li { color: #2c2f36; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

/* placeholder flag */
.ph { background: var(--gold-soft); border-left: 2px solid var(--gold); padding: 2px 6px; border-radius: 2px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: #aeb4bf; padding: clamp(56px, 7vw, 90px) 0 40px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand { font-family: var(--display); font-size: 1.5rem; color: #fff; margin-bottom: 16px; }
.footer__brand .dot { color: var(--gold); }
.footer p { font-size: .9rem; line-height: 1.6; max-width: 32ch; }
.footer h4 { font-family: var(--body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 16px; }
.footer__col a { display: block; padding: 7px 0; font-size: .9rem; color: #aeb4bf; transition: color .25s; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid var(--gray-line-d); margin-top: 56px; padding-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--gray); }

/* fade-in */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .expertise-grid, .cards, .video-grid, .values { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.08); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__cta { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .expertise-grid, .cards, .video-grid, .values, .form-row { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}
