/* ============================================================
   cauri OÜ — landing page
   Plain CSS, no build step. Design system lives in :root.
   ============================================================ */

/* ---------- Fonts (self-hosted, OFL-1.1, see assets/fonts) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --label: "Space Grotesk", var(--sans);

  /* warm, paper-and-bronze palette (cowrie shell, ancient currency) */
  --bg: #f6f1e7;
  --bg-2: #efe8da;
  --surface: #fbf8f1;
  --ink: #1b1712;
  --ink-soft: #574f44;
  --ink-faint: #837a6c;
  --line: rgba(27, 23, 18, 0.14);
  --line-soft: rgba(27, 23, 18, 0.08);
  --accent: #b5793a;       /* bronze — surfaces, mark, rules */
  --accent-ink: #8a551f;   /* darker bronze — accent text on light */
  --accent-wash: rgba(181, 121, 58, 0.1);

  /* inverted band (dark on a light page) */
  --inv-bg: #17130d;
  --inv-bg-2: #211b13;
  --inv-ink: #efe7d7;
  --inv-ink-soft: #b6ac9a;
  --inv-line: rgba(239, 231, 215, 0.16);
  --inv-accent: #e0a85c;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);

  --shadow: 0 1px 2px rgba(27, 23, 18, 0.04),
            0 12px 34px -18px rgba(27, 23, 18, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110c;
    --bg-2: #1a160f;
    --surface: #1d1810;
    --ink: #f1eadb;
    --ink-soft: #b3a893;
    --ink-faint: #857c6c;
    --line: rgba(241, 234, 219, 0.14);
    --line-soft: rgba(241, 234, 219, 0.07);
    --accent: #e0a85c;
    --accent-ink: #e6b571;
    --accent-wash: rgba(224, 168, 92, 0.12);

    /* inverted band flips to warm paper inside the dark page */
    --inv-bg: #efe7d7;
    --inv-bg-2: #e6dccb;
    --inv-ink: #1b1712;
    --inv-ink-soft: #574f44;
    --inv-line: rgba(27, 23, 18, 0.16);
    --inv-accent: #8a551f;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
              0 18px 44px -20px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Typography primitives ---------- */
.eyebrow {
  font-family: var(--label);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 420;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.1rem);
  letter-spacing: -0.028em;
  line-height: 1.02;
}
h2.title {
  font-size: clamp(1.95rem, 1.2rem + 2.9vw, 3.15rem);
}
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); }

.lede {
  font-size: clamp(1.12rem, 1.02rem + 0.5vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 40ch;
  text-wrap: pretty;
}
p { text-wrap: pretty; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}
.brand .mark { width: 1.55rem; height: 1.55rem; color: var(--accent); flex: none; }
.brand .word {
  font-family: var(--label);
  font-weight: 500;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}
.brand .word b { font-weight: 500; }
.brand .oe {
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 0.82em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-family: var(--label);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-loc {
  font-family: var(--label);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
@media (max-width: 860px) {
  .nav-links, .nav-loc { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--ink);
  --_fg: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--label);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.92rem 1.4rem;
  border-radius: 999px;
  background: var(--_bg);
  color: var(--_fg);
  border: 1px solid var(--_bg);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn .arw { transition: transform 0.2s ease; }
.btn:hover .arw { transform: translate(3px, -3px); }
.btn--accent { --_bg: var(--accent); --_fg: #fff; }
.btn--ghost {
  --_bg: transparent;
  --_fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -18%;
  right: -12%;
  width: min(52vw, 620px);
  aspect-ratio: 1;
  background: radial-gradient(circle at center, var(--accent-wash), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy { max-width: 22ch; }
.hero .display { margin-top: 1.4rem; }
.hero .lede { margin-top: 1.5rem; max-width: 46ch; }
.hero-copy { max-width: none; }
.hero .cta-row { margin-top: 2.2rem; }

.hero-figure {
  display: grid;
  place-items: center;
  position: relative;
}
.hero-figure .glyph {
  width: min(74%, 260px);
  color: var(--accent);
  opacity: 0.9;
  filter: drop-shadow(0 24px 40px rgba(181, 121, 58, 0.18));
}
.hero-figure .ring {
  position: absolute;
  inset: 6%;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.hero-figure .ring:nth-child(2) { inset: 18%; opacity: 0.6; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { display: none; }
}

/* ---------- Marquee / trust strip ---------- */
.strip {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  align-items: center;
  padding-block: 1.3rem;
}
.strip span {
  font-family: var(--label);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.strip span.k { color: var(--accent-ink); }

/* ---------- Inverted band (thesis) ---------- */
.invert {
  background:
    radial-gradient(120% 120% at 85% -10%, var(--inv-bg-2), transparent 55%),
    var(--inv-bg);
  color: var(--inv-ink);
}
.invert .eyebrow { color: var(--inv-accent); }
.invert .lede, .invert p { color: var(--inv-ink-soft); }
.thesis-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.6rem, 5vw, 4.5rem);
  align-items: start;
}
.thesis-grid h2 { color: var(--inv-ink); }
.thesis-body { display: grid; gap: 1.15rem; font-size: 1.08rem; line-height: 1.7; }
.thesis-body strong { color: var(--inv-ink); font-weight: 600; }
@media (max-width: 800px) {
  .thesis-grid { grid-template-columns: 1fr; }
}

/* ---------- Section head ---------- */
.section-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.section-head .eyebrow { margin-bottom: 1.1rem; }
.section-head p { margin-top: 1.2rem; color: var(--ink-soft); max-width: 52ch; }

/* ---------- Practice (two pillars) ---------- */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}
.pillar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.pillar .kicker {
  font-family: var(--label);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.pillar .kicker b { font-weight: 500; color: var(--ink-faint); }
.pillar p { color: var(--ink-soft); }
.pillar ul {
  list-style: none;
  padding: 0;
  margin-top: 0.4rem;
  display: grid;
  gap: 0.7rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.3rem;
}
.pillar li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.98rem;
  color: var(--ink);
}
.pillar li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.5rem; height: 0.5rem;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.bridge {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.98rem + 0.7vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0.4rem auto 1.8rem;
  font-style: italic;
}
.bridge b { color: var(--ink); font-style: normal; font-weight: 500; }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Industries ---------- */
.ind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}
.ind-copy p { color: var(--ink-soft); margin-top: 1.2rem; }
.ind-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; }
.tag {
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.tag--k {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.ind-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.4rem;
}
.stat { display: grid; gap: 0.25rem; }
.stat .n {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.stat .l { font-size: 0.92rem; color: var(--ink-soft); }
.stat + .stat { border-top: 1px solid var(--line-soft); padding-top: 1.4rem; }
@media (max-width: 780px) {
  .ind-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact { position: relative; }
.contact-card {
  background:
    radial-gradient(130% 120% at 12% 0%, var(--accent-wash), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.6rem);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.8rem, 4vw, 3.4rem);
  align-items: start;
}
.contact-intro h2 { margin-top: 1rem; }
.contact-intro p { color: var(--ink-soft); margin-top: 1.1rem; max-width: 38ch; }
.contact-meta {
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  line-height: 1.8;
  margin-top: 1.6rem;
}

/* form */
.contact-form { display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--label);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field label span { text-transform: none; letter-spacing: 0; color: var(--ink-faint); }
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.78rem 0.9rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 6.5rem; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23837a6c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.contact-form .btn { justify-self: start; margin-top: 0.3rem; }
.contact-form .btn[disabled] { opacity: 0.6; pointer-events: none; }

/* honeypot: taken out of layout and the tab order, invisible to people */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.form-status {
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 1.2em;
  margin-top: 0.2rem;
}
.form-status.ok { color: var(--accent-ink); font-weight: 500; }
.form-status.err { color: #c0392b; }
@media (prefers-color-scheme: dark) {
  .form-status.err { color: #f0876b; }
}

@media (max-width: 760px) {
  .contact-card { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.6rem, 5vw, 4rem);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand { display: grid; gap: 0.9rem; max-width: 28ch; }
.foot-brand .brand .mark { color: var(--accent); }
.foot-brand p { font-size: 0.9rem; color: var(--ink-faint); }
.foot-cols { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.foot-col { display: grid; gap: 0.6rem; }
.foot-col h4 {
  font-family: var(--label);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.foot-col a, .foot-col span { font-size: 0.92rem; color: var(--ink-soft); }
.foot-col a:hover { color: var(--ink); }
.foot-legal {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- Scroll reveal (progressive, no JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
    @keyframes reveal-in {
      from { opacity: 0; transform: translateY(26px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .hero .reveal { animation: none; }
  }
}
