/* SoftExp — softexpsolutions.com
   Type: Fraunces (echoes "Soft") + Archivo (echoes "EXP"), both self-hosted (no Google requests → GDPR-friendly).
   Colour: monochrome like the logo; --check is the only optional accent (logo check, tagline check, active marker). */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2-variations"), url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations"), url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111214;
  --paper: #F6F5F2;
  --card: #FFFFFF;
  --tint: #EEEBE5;
  --muted: #5E5E5A;
  --line: #E2DFD8;
  --line-strong: #CFCBC3;
  --check: #111214; /* try #2E44D6, #D4461A or #0E7A5A */
  --gutter: clamp(24px, 6.7vw, 96px);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--muted); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.serif { font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 100; }
.label {
  font-family: var(--sans); font-weight: 700; font-stretch: 125%;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.check-glyph { display: inline-block; width: 0.74em; height: 0.66em; margin-left: 0.1em; vertical-align: baseline; fill: var(--check); }

/* ---------- header ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter); }
.logo { display: flex; align-items: center; color: var(--ink); }
.logo svg { width: auto; height: 40px; }
.logo .logo-check { fill: var(--check); }
.nav { display: flex; align-items: center; gap: 36px; }
.nav > a { font-size: 15px; font-weight: 500; text-decoration: none; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a {
  display: grid; place-items: center; min-width: 48px; height: 44px; padding: 0 14px; border-radius: 999px;
  font-weight: 700; font-stretch: 125%; font-size: 12px; letter-spacing: 0.06em; text-decoration: none;
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 32px; padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(64px, 9vw, 128px); }
.hero h1 { margin: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 400; }
.hero .t1 { font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 100; font-size: clamp(46px, 6.1vw, 88px); line-height: 1.04; letter-spacing: -0.02em; }
.hero .t2 { font-family: var(--sans); font-weight: 800; font-size: clamp(40px, 5.3vw, 76px); line-height: 1.06; letter-spacing: -0.035em; }
.hero p { margin: 0; max-width: 640px; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); }

/* ---------- references ---------- */
.section { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 104px) var(--gutter) clamp(60px, 8vw, 120px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head h2 { margin: 0; font-size: clamp(36px, 3.9vw, 56px); letter-spacing: -0.015em; line-height: 1.1; }

.refs { display: flex; gap: 88px; align-items: flex-start; }
.ref-list { margin: 0; padding: 0; list-style: none; flex: 1 1 auto; border-top: 1px solid var(--line); }
.ref-list li { border-bottom: 1px solid var(--line); }
.ref-list button {
  width: 100%; display: flex; align-items: center; gap: 24px; min-height: 66px; padding: 0 8px;
  border: 0; background: transparent; cursor: pointer; text-align: left;
}
.ref-list .num { flex: 0 0 32px; font-weight: 700; font-stretch: 125%; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.ref-list .domain { flex: 1 1 auto; font-size: 21px; letter-spacing: -0.01em; font-weight: 400; }
.ref-list .tag { font-size: 14px; color: var(--muted); }
.ref-list .mark { flex: 0 0 auto; width: 20px; height: 18px; fill: var(--check); opacity: 0; transform: scale(0.6); transition: opacity 200ms ease, transform 260ms cubic-bezier(.2,.8,.2,1); }
.ref-list button[aria-pressed="true"] .domain { font-weight: 600; }
.ref-list button[aria-pressed="true"] .mark { opacity: 1; transform: none; }

.stack { position: relative; flex: 0 0 600px; height: 560px; }
.card {
  position: absolute; left: 0; bottom: 0; width: 560px; height: 480px;
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(17,18,20,.04), 0 14px 36px rgba(17,18,20,.08);
  transform-origin: 50% 100%;
  --k: 0;
  transform: translate(calc(var(--k) * 12px), calc(var(--k) * -16px)) rotate(calc(var(--k) * 2.5deg)) scale(calc(1 - var(--k) * 0.035));
  transition: transform 520ms cubic-bezier(.2,.8,.2,1), opacity 320ms ease;
}
.card[data-hidden] { opacity: 0; pointer-events: none; }
.card-visual { height: 236px; flex: 0 0 auto; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 28px; background: var(--tint); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.card-letter { font-weight: 800; font-stretch: 125%; font-size: 148px; line-height: 0.74; letter-spacing: -0.02em; }
.card-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 24px 28px 26px; }
.card-body h3 { margin: 0; font-size: 25px; letter-spacing: -0.01em; line-height: 1.2; }
.card-body p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-link svg { width: 14px; height: 14px; }
.swipe-hint { display: none; }

/* ---------- contact ---------- */
.contact { display: flex; flex-direction: column; gap: 26px; }
.contact h2 { margin: 0; font-size: clamp(36px, 3.9vw, 56px); letter-spacing: -0.015em; line-height: 1.08; }
.email { align-self: flex-start; font-weight: 800; font-size: clamp(20px, 3.9vw, 56px); letter-spacing: -0.03em; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 12px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; padding-top: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--paper); border: 0; }
.btn-primary:hover { color: var(--paper); opacity: .88; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); }
.btn .icon-done { display: none; fill: var(--check); width: 20px; }
.btn.is-copied .icon-done { display: block; }
.btn.is-copied .icon-copy { display: none; }

/* ---------- footer ---------- */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 28px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; gap: 28px; }
.site-footer a { text-decoration: none; }

/* ---------- legal pages ---------- */
.legal { max-width: 760px; padding: clamp(48px, 7vw, 96px) var(--gutter); }
.legal h1 { font-size: clamp(36px, 4vw, 56px); margin: 0 0 24px; line-height: 1.1; }
.legal .todo { padding: 16px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }

/* ---------- tablet / mobile: stack becomes a swipe row ---------- */
@media (max-width: 1100px) {
  .refs { gap: 48px; }
  .stack { flex-basis: 480px; height: 520px; }
  .card { width: 440px; height: 460px; }
}
@media (max-width: 900px) {
  .nav > a { display: none; }
  .logo svg { height: 32px; }
  .refs { display: block; }
  .ref-list { display: none; }
  .stack {
    display: flex; gap: 14px; height: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-padding-left: var(--gutter);
    scrollbar-width: none;
  }
  .stack::-webkit-scrollbar { display: none; }
  .card { position: relative; flex: 0 0 300px; width: 300px; height: auto; min-height: 456px; transform: none !important; opacity: 1 !important; pointer-events: auto !important; scroll-snap-align: start; box-shadow: none; border-radius: 18px; }
  .card-visual { height: 196px; padding: 18px 20px; }
  .card-letter { font-size: 120px; }
  .card-body { padding: 18px 20px 16px; }
  .card-body h3 { font-size: 21px; }
  .card-body p { font-size: 14px; }
  .swipe-hint { display: block; margin-top: 20px; font-size: 10px; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .ref-list .mark { transition: none; }
}
