/* ============================================================
   Solveth — marketing site
   Palette pulled from the logo; no colors introduced beyond it.
   ============================================================ */

:root {
  --paper:      #F7F4EE; /* background */
  --ink:        #23272B; /* primary text */
  --slate:      #8C99A1; /* muted / secondary */
  --gold:       #D9973F; /* accent, SOL, CTAs */
  --gold-deep:  #C9762E; /* hover / active */
  --highlight:  #FBE9BC; /* sun glow, soft backgrounds */

  /* derived, still within-palette tints */
  --paper-2:    #F2EDE3;
  --hairline:   rgba(35, 39, 43, 0.10);
  --ink-soft:   rgba(35, 39, 43, 0.72);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(35,39,43,.05), 0 12px 32px -16px rgba(35,39,43,.22);
}

* { box-sizing: border-box; }

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

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

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

a { color: inherit; }

::selection { background: var(--highlight); color: var(--ink); }

/* ---- Accessibility helpers ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; z-index: 100;
  font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap--narrow { max-width: 720px; }

.section { padding-block: clamp(64px, 10vw, 128px); }

.eyebrow {
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 14px;
}

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 20ch;
}
.section__lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 40px;
}
.accent { color: var(--gold); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav__brand { display: inline-flex; line-height: 0; }
.nav__brand img { width: 160px; height: auto; }
.nav__cta {
  font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--ink);
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--hairline);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--highlight); border-color: transparent; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  padding: 14px 26px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary {
  background: var(--gold); color: #2a1c07;
  box-shadow: 0 8px 20px -10px rgba(217,151,63,.9);
}
.btn--primary:hover { background: var(--gold-deep); color: #fff; transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--hairline);
}
.btn--ghost:hover { border-color: var(--gold); background: var(--highlight); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 9vw, 112px);
  overflow: hidden;
}
/* soft warm wash behind the hero, within palette */
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%;
  height: 120%;
  background: radial-gradient(60% 55% at 72% 30%, var(--highlight) 0%, transparent 60%);
  opacity: .55; pointer-events: none; z-index: 0;
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 24px;
  text-align: center;
}
.hero__mark {
  margin: 0 auto 8px;
  max-width: 460px;
}
.mark { width: 100%; height: auto; overflow: visible; }

.hero__wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(52px, 11vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}
.hero__wordmark .sol { color: var(--gold); }
.hero__wordmark .veth { color: var(--ink); }

.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 500;
  color: var(--ink);
  margin: 14px 0 0;
}
.hero__lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 20px auto 0;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

/* ============================================================
   Hero mark animation (draw the tangle, then light the sun)
   ============================================================ */
.mark__line {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
}
.mark__sun {
  opacity: 0;
  transform: scale(.2);
  transform-origin: 522px 100px;
}
.mark.is-animating .mark__line {
  animation: draw-line 2.1s cubic-bezier(.65,.02,.24,1) forwards;
}
.mark.is-animating .mark__sun {
  animation: light-sun .9s cubic-bezier(.2,.8,.2,1) 1.75s forwards;
}
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@keyframes light-sun {
  0%   { opacity: 0; transform: scale(.2); }
  60%  { opacity: 1; transform: scale(1.28); }
  100% { opacity: 1; transform: scale(1); }
}
/* Final resting state once animation completes / when JS not run */
.mark.is-done .mark__line { stroke-dashoffset: 0; }
.mark.is-done .mark__sun  { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .mark__line { stroke-dashoffset: 0 !important; animation: none !important; }
  .mark__sun  { opacity: 1 !important; transform: scale(1) !important; animation: none !important; }
}

/* ============================================================
   The idea — three steps
   ============================================================ */
.idea { background: var(--paper-2); }
.idea__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.step {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--highlight); color: var(--gold-deep);
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 22px; margin: 0 0 8px;
}
.step p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* ============================================================
   The apps
   ============================================================ */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.app {
  --accent: var(--gold);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.app:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -22px rgba(35,39,43,.4); }
@media (prefers-reduced-motion: reduce) { .app:hover { transform: none; } }

/* Abstract brand mark per card — deliberately non-descriptive (no product hints),
   just the Solveth "unresolved dot" motif tinted in each app's accent color. */
.app__glyph {
  position: relative;
  height: 150px;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 20% 15%, color-mix(in srgb, var(--accent) 20%, var(--paper)) 0%, var(--paper) 70%);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.app__glyph-shape {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.app__glyph-shape::after {
  content: ""; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  top: 8px; right: 8px;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent);
}

.app--poise   { --accent: #D9973F; }
.app--tend    { --accent: #6E8B6B; }
.app--marquee { --accent: #B4703A; }

.app__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.app__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app__name {
  font-family: var(--serif); font-weight: 600; font-size: 26px;
  margin: 0; color: var(--ink);
}
.badge {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--highlight);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.app__pitch { margin: 0; color: var(--ink-soft); font-size: 16.5px; }

/* ============================================================
   Why Solveth
   ============================================================ */
.why { background: var(--paper-2); }
.why__prose p {
  font-size: clamp(18px, 2.3vw, 21px);
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.why__prose em { color: var(--ink); font-style: italic; }

/* ============================================================
   Notify
   ============================================================ */
.notify__inner { text-align: center; }
.notify .section__lede { margin-inline: auto; }
.notify__form {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  max-width: 520px; margin: 0 auto;
}
.notify__input {
  flex: 1 1 260px;
  font-family: var(--sans); font-size: 16px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--slate);
  background: var(--paper);
  color: var(--ink);
}
.notify__input::placeholder { color: var(--slate); }
.notify__input:focus-visible { border-color: var(--gold-deep); }
.notify__form.is-done .notify__input { border-color: #6E8B6B; }
.notify__note {
  margin: 18px 0 0; font-size: 14.5px; color: var(--slate);
}
.notify__note.is-success { color: #4f6b4c; font-weight: 600; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 36px;
  background: var(--paper);
}
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.site-footer__logo { width: 120px; height: auto; opacity: .9; }
.site-footer__copy { margin: 0; color: var(--slate); font-size: 14.5px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .idea__steps { grid-template-columns: 1fr; }
  .apps__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .nav__brand img { width: 140px; }
  .hero__actions .btn { flex: 1 1 auto; }
}
