/* Entrare brochure site — tokens from assets/brand/Entrare-Logo-Kit/tokens */
:root {
  --midnight: #16202E;
  --brass: #B38B59;       /* key bar + rare highlights only; never small text on light */
  --deep-brass: #8A6A3F;  /* accessible accent text on light */
  --stone: #E8E3DA;
  --ivory: #FAF8F4;
  --graphite: #5E646E;
  --white: #FFFFFF;
  --line: #E3DDD2;

  --font-display: 'Sora', 'Avenir Next', sans-serif;
  --font-ui: 'Manrope', 'Helvetica Neue', Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--midnight);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--midnight); }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-family: var(--font-ui); font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--midnight); color: var(--ivory); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--deep-brass); outline-offset: 3px; border-radius: 4px; }

/* Labels — Manrope 600, tracked caps, Deep Brass on light */
.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-brass);
  margin-bottom: 18px;
}
.label-brass { color: var(--brass); } /* allowed on Midnight (5.3:1) */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 0.98rem/1 var(--font-ui);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--midnight); color: var(--ivory); }
.btn-primary:hover { background: #22303F; }
.btn-ghost { border-color: #CFC8BB; color: var(--midnight); background: transparent; }
.btn-ghost:hover { border-color: var(--midnight); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand img { width: 132px; height: auto; } /* ≥ 96px min lockup width */
.nav { display: flex; gap: 34px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.96rem; color: var(--graphite); transition: color .2s; }
.nav a:hover { color: var(--midnight); }
.header-actions { display: flex; align-items: center; gap: 14px; }

.lang { display: inline-flex; background: var(--stone); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font: 600 0.78rem/1 var(--font-ui); letter-spacing: 0.08em; color: var(--graphite);
  padding: 8px 11px; border-radius: 999px; min-width: 38px;
}
.lang button[aria-pressed="true"] { background: var(--white); color: var(--midnight); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--midnight); transition: transform .25s var(--ease); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { max-width: 12ch; }
.lead { margin-top: 26px; font-size: 1.16rem; color: var(--graphite); max-width: 34rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-points { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hero-points li { position: relative; padding-left: 18px; font-weight: 600; font-size: 0.92rem; color: var(--midnight); }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 4px; margin-top: -2px; background: var(--brass); }

.hero-visual { position: relative; padding: 24px 0 124px; }
.pass-card {
  position: relative;
  background: var(--midnight); color: var(--stone);
  border-radius: 28px; padding: 32px;
  max-width: 420px; margin-left: auto;
}
.pass-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pass-mark { width: 26px; height: auto; }
.pass-status {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass);
}
.pass-zone { display: flex; flex-direction: column; margin: 44px 0 30px; }
.pass-zone-name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 2rem; line-height: 1.1; color: var(--ivory); }
.pass-zone-meta { margin-top: 8px; font-size: 0.92rem; color: #A7ADB6; }
.pass-code { display: flex; gap: 22px; align-items: center; padding-top: 26px; border-top: 1px solid rgba(232, 227, 218, 0.14); }
.qr {
  flex: 0 0 auto; width: 118px; height: 118px; padding: 10px;
  background: var(--ivory); border-radius: 12px;
  display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr);
}
.qr i { background: var(--midnight); }
.pin { display: flex; flex-direction: column; min-width: 0; }
.pin-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #A7ADB6; }
.pin-value { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; letter-spacing: 0.04em; color: var(--ivory); margin: 4px 0 8px; }
.pin-hint { font-size: 0.8rem; line-height: 1.45; color: #A7ADB6; }

.float-card {
  position: absolute; left: 0; bottom: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  padding: 18px 22px; min-width: 200px;
  display: flex; flex-direction: column;
}
.float-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); }
.float-value { font-family: var(--font-display); font-weight: 600; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.2; }
.float-value small { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500; color: var(--graphite); letter-spacing: 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 34px; margin-top: 10px; }
.bars span { flex: 1; height: calc(var(--h) * 100%); background: var(--stone); border-radius: 3px; }
.bars span:first-child { background: var(--midnight); }

/* Key-bar slide-in (bar travels horizontally into its slot; never rotates or recolours) */
.keybar { transform-box: fill-box; }
.js .hero-visual .keybar, .js .statement .keybar { transform: translateX(160%); opacity: 0; }
.js .is-visible .keybar { transform: none; opacity: 1; transition: transform .9s var(--ease) .35s, opacity .4s ease .35s; }

/* Facts */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 34px 24px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; }
.fact-value { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; }
.fact-text { color: var(--graphite); font-size: 0.95rem; }

/* Sections */
.section { padding: clamp(80px, 10vw, 136px) 0; }
.section-stone { background: var(--stone); }
.section-head { max-width: 44rem; margin-bottom: clamp(44px, 6vw, 72px); }
.section-lead { margin-top: 20px; font-size: 1.1rem; color: var(--graphite); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 30px 34px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.feature:hover { border-color: #CFC8BB; transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--ivory); border: 1px solid var(--line);
  display: grid; place-items: center; margin-bottom: 26px;
}
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--midnight); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature-icon svg .accent { stroke: var(--brass); stroke-width: 2; }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--graphite); font-size: 0.98rem; }

/* End-to-end delivery */
.delivery-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 104px); align-items: start; }
.delivery-intro { position: sticky; top: 120px; }
.terminal { margin-top: 44px; display: flex; align-items: flex-end; gap: 20px; }
.terminal svg { width: 96px; height: auto; }
.stages { list-style: none; margin: 0; padding: 0; counter-reset: stage; }
.stage { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 30px 0; border-top: 1px solid #D6CFC2; }
.stage:last-child { border-bottom: 1px solid #D6CFC2; }
.stage-num { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--deep-brass); padding-top: 3px; }
.stage h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 1.35rem; margin-bottom: 8px; }
.stage p { color: var(--graphite); }

/* Roles */
.roles { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); }
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.role-tabs button {
  border: 1.5px solid transparent; background: transparent; cursor: pointer;
  font: 600 0.95rem/1 var(--font-ui); color: var(--graphite);
  padding: 12px 20px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.role-tabs button:hover { color: var(--midnight); }
.role-tabs button[aria-selected="true"] { background: var(--midnight); color: var(--ivory); }
.role-panel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; animation: fade .4s var(--ease); }
.role-panel[hidden] { display: none; }
.role-panel h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; margin-bottom: 14px; }
.role-panel p { color: var(--graphite); font-size: 1.05rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { position: relative; padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); font-weight: 500; }
.checks li:last-child { border-bottom: 0; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 16px; height: 9px; margin-top: -6px;
  border-left: 2px solid var(--midnight); border-bottom: 2px solid var(--midnight); transform: rotate(-45deg);
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 34px; border-top: 1.5px solid var(--midnight); }
.step::before { content: ""; position: absolute; top: -1.5px; left: 0; width: 56px; height: 4px; background: var(--brass); }
.step-num { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--graphite); margin-bottom: 18px; }
.step h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 1.6rem; margin-bottom: 12px; }
.step p { color: var(--graphite); max-width: 22rem; }

/* Statement */
.statement { background: var(--midnight); color: var(--stone); padding: clamp(80px, 11vw, 144px) 0; }
.statement-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(36px, 7vw, 96px); align-items: center; }
.statement-mark { width: clamp(88px, 11vw, 136px); height: auto; }
.statement-text {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 3.1vw, 2.5rem); line-height: 1.25; color: var(--ivory); max-width: 30ch;
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.contact-list { margin: 40px 0 0; display: grid; gap: 20px; }
.contact-list div { display: grid; gap: 2px; }
.contact-list dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); }
.contact-list dd { margin: 0; font-weight: 600; font-size: 1.1rem; }
.contact-list a { color: var(--deep-brass); text-decoration: none; border-bottom: 1px solid currentColor; }

.contact-form {
  background: var(--white); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px;
}
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--midnight); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-ui); color: var(--midnight);
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; transition: border-color .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E646E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--midnight); background: var(--white); }
.field input[aria-invalid="true"] { border-color: #B4432F; }
.form-note { font-size: 0.9rem; color: var(--graphite); min-height: 1.4em; }
.form-note.error { color: #B4432F; }

/* Footer */
.site-footer { background: var(--midnight); color: #A7ADB6; padding: 72px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 48px; border-bottom: 1px solid rgba(232, 227, 218, 0.12); }
.footer-brand img { width: 132px; height: auto; }
.footer-brand p { margin-top: 18px; max-width: 26rem; font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 32px; align-content: flex-start; }
.footer-nav a, .footer-bottom a { text-decoration: none; color: var(--stone); font-weight: 500; font-size: 0.95rem; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--ivory); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 0.88rem; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .pass-card { margin: 0 auto 0 48px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .role-panel, .contact-grid, .delivery-grid { grid-template-columns: 1fr; }
  .delivery-intro { position: static; }
  .terminal { display: none; }
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 0; font-size: 1.05rem; color: var(--midnight); border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .hide-sm { display: none; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner { height: 68px; }
  .nav { top: 68px; }
  .brand img { width: 112px; }
  .features { grid-template-columns: 1fr; }
  .hero-visual { padding-bottom: 116px; }
  .pass-card { margin: 0; padding: 26px; border-radius: 24px; }
  .pass-code { gap: 16px; }
  .qr { width: 96px; height: 96px; padding: 8px; }
  .pin-value { font-size: 1.5rem; }
  .float-card { left: auto; right: 12px; min-width: 170px; padding: 14px 18px; }
  .statement-inner { grid-template-columns: 1fr; }
  .statement-mark { width: 72px; }
  .field-row { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .fact { padding: 24px 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .stage { grid-template-columns: 40px 1fr; gap: 12px; padding: 24px 0; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero-visual .keybar, .js .statement .keybar { transform: none; opacity: 1; }
}
