/*
 * CLOAK, site vitrine. The tokens are the app's (src/design/tokens.ts): graphite
 * ground, ivory text, champagne for touches only (rule, overline, figure), never
 * a fill. Faces: EB Garamond for display, Inter for the rest, as in the app.
 */
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/eb-garamond-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #08090a;
  --surface-1: #101214;
  --surface-2: #16191b;
  --line: rgba(243, 240, 232, 0.09);
  --line-strong: rgba(243, 240, 232, 0.16);
  --text: #f3f0e8;
  --text-2: #a9a79f;
  --text-3: #85847e;
  --ivory: #f3f0e8;
  --on-ivory: #0b0c0d;
  --champagne: #c9ac82;
  --champagne-line: rgba(201, 172, 130, 0.36);
  --serif: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(24px, 6vw, 96px);
  --measure: 38rem;
  --wide: 76rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration-color: var(--champagne-line); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { text-decoration-color: var(--champagne); }
:focus-visible { outline: 1px solid var(--champagne); outline-offset: 4px; border-radius: 2px; }

.skip { position: absolute; left: var(--gutter); top: -100px; padding: 0.75rem 1rem; background: var(--ivory); color: var(--on-ivory); font-weight: 500; z-index: 10; }
.skip:focus { top: 1rem; }

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: calc(env(safe-area-inset-top, 0px) + 1.75rem) var(--gutter) 1.75rem;
}
.site-header.solid { position: static; border-bottom: 1px solid var(--line); }

.wordmark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.1875rem;
  line-height: 1.25;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); text-decoration: none; letter-spacing: 0.02em; }
.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--text); }

/* Type */
.overline {
  margin: 0 0 1.25rem;
  font: 500 0.6875rem/1.45 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
}

h1,
h2,
h3 { margin: 0; font-weight: 400; }

.display {
  font-family: var(--serif);
  font-size: clamp(2.875rem, 2rem + 4.2vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
}

.title {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 1.5rem + 1.9vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.006em;
}

.lead { margin: 1.5rem 0 0; max-width: 32rem; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--text); font-weight: 300; }
.muted { color: var(--text-2); }

.rule { width: 3rem; height: 1px; margin: 2rem 0; border: 0; background: var(--champagne-line); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.55) 0%, rgba(8, 9, 10, 0.1) 30%, rgba(8, 9, 10, 0.72) 62%, #08090a 100%);
}
.hero-copy { position: relative; width: 100%; max-width: var(--wide); padding: 8rem var(--gutter) clamp(3rem, 8vh, 6rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; }

.badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  min-height: 3.375rem;
  padding: 0 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.text-link { font-size: 0.9375rem; font-weight: 500; }

@media (min-width: 960px) {
  .hero { align-items: center; }
  .hero-media { left: 50%; }
  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(8, 9, 10, 0.7) 0%, rgba(8, 9, 10, 0) 16%),
      linear-gradient(90deg, #08090a 0%, rgba(8, 9, 10, 0.35) 30%, rgba(8, 9, 10, 0.05) 70%, rgba(8, 9, 10, 0.3) 100%);
  }
  .hero-copy { padding-top: 10rem; padding-bottom: 6rem; }
  .hero-copy > * { max-width: 34rem; }
}

/* Sections */
.section { padding: clamp(5rem, 12vw, 9rem) var(--gutter); border-top: 1px solid var(--line); }
.section-inner { max-width: var(--wide); margin: 0 auto; }
.section-head { max-width: 40rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }

.steps { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.steps li { padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.step-number { display: block; margin-bottom: 1.25rem; font: 500 0.6875rem/1 var(--sans); letter-spacing: 0.18em; color: var(--champagne); }
.steps h3 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; margin-bottom: 0.75rem; }
.steps p { margin: 0; color: var(--text-2); font-size: 0.9375rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 3rem 2.5rem; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.points { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.points li { display: grid; gap: 0.5rem 3rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.points h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.005em; }
.points p { margin: 0; color: var(--text-2); font-size: 0.9375rem; max-width: var(--measure); }
@media (min-width: 860px) { .points li { grid-template-columns: minmax(14rem, 1fr) 2fr; } }

.split { display: grid; gap: 3rem; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: start; } }

.contact-line { margin-top: 2.5rem; }

.closing { padding: clamp(6rem, 14vw, 11rem) var(--gutter); border-top: 1px solid var(--line); text-align: center; }
.closing .wordmark { display: inline-block; margin: 0 -0.5em 0 0; font-size: 1.5625rem; }
.closing .rule { margin: 2rem auto; }
.closing .tagline { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.25; }

/* Footer */
.site-footer { padding: 3rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 3rem); border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.8125rem; }
.site-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; max-width: var(--wide); margin: 0 auto; }
.site-footer p { margin: 0; }
.site-footer .footer-contact,
.site-footer .footer-en { margin-top: 0.75rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--text-2); }

/* Document pages: legal notice, privacy, support */
.document { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(3.5rem, 9vw, 6rem) var(--gutter) clamp(4rem, 10vw, 7rem); }
.document h1 { font-family: var(--serif); font-size: clamp(2.25rem, 1.8rem + 2.2vw, 3.5rem); line-height: 1.08; }
.document .intro { margin: 1.5rem 0 0; color: var(--text-2); }
.document section { margin-top: 3.25rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.document h2 { font-family: var(--serif); font-size: 1.625rem; line-height: 1.2; margin-bottom: 1rem; }
.document h3 { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.document p,
.document li { color: var(--text-2); font-size: 0.9688rem; }
.document p { margin: 0 0 1rem; }
.document ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.document li { margin-bottom: 0.5rem; }
.document li::marker { color: var(--champagne); }
.document strong { color: var(--text); font-weight: 500; }
.document dl { margin: 0; display: grid; gap: 0.25rem 2rem; }
.document dt { color: var(--text-3); font-size: 0.8125rem; letter-spacing: 0.02em; }
.document dd { margin: 0 0 0.9rem; color: var(--text); }
@media (min-width: 640px) { .document dl { grid-template-columns: 13rem 1fr; } .document dd { margin: 0; } .document dt, .document dd { padding: 0.55rem 0; border-bottom: 1px solid var(--line); } }
.updated { margin-top: 3.5rem; color: var(--text-3); font-size: 0.8125rem; }

.contact-card { margin-top: 2.5rem; padding: 1.75rem; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface-1); }
.contact-card p { margin: 0; }
.contact-card .address { margin-top: 0.5rem; font-size: 1.25rem; font-family: var(--serif); color: var(--text); }

/* Preview only: blanks and what counsel must settle stay in sight */
.blank { padding: 0.05em 0.4em; border: 1px dashed var(--champagne); border-radius: 4px; background: rgba(201, 172, 130, 0.08); color: var(--champagne); font-style: normal; }
.note { margin: 1rem 0; padding: 0.9rem 1.1rem; border-left: 1px solid var(--champagne); background: var(--surface-1); color: var(--text-2); font-size: 0.875rem; }
.preview-banner { position: fixed; inset: auto 0 0; z-index: 20; margin: 0; padding: 0.6rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 0.6rem); background: var(--champagne); color: var(--on-ivory); font-size: 0.8125rem; font-weight: 500; line-height: 1.4; text-align: center; }
.preview-banner ~ .site-footer { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 7rem); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
