/* ─────────────────────────────────────────────
   Sprak landing — calm editorial parchment
   ───────────────────────────────────────────── */

:root {
  --parchment:       #F6F3EC;
  --parchment-warm:  #EFE9DB;
  --parchment-deep:  #E8E1CE;
  --ink:             #1A1A1A;
  --ink-soft:        #5C564E;
  --ink-faint:       #8A847A;
  --rule:            #E0DACD;
  --rule-strong:     #C9C2AE;
  --terracotta:      #9C5F4D;
  --terracotta-deep: #7E4936;
  --forest:          #2D6B54;
  --forest-soft:     #3F8870;
  --amber:           #B8893E;

  --serif: "Source Serif 4", "Source Serif Pro", "Cormorant Garamond", Georgia, serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--parchment);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  background: var(--parchment);
  background-image:
    radial-gradient(rgba(0,0,0,0.018) 1px, transparent 1px);
  background-size: 4px 4px;
  overflow-x: hidden;
}

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

/* ───── Type scale ───── */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 28px;
}
.lede {
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  text-wrap: pretty;
}
.lede-soft { color: var(--ink-faint); font-style: italic; margin-top: 14px; }

em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ───── Drifting greetings background ───── */
.greetings {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.greet {
  position: absolute;
  font-family: var(--serif);
  font-weight: 300;
  color: var(--terracotta);
  white-space: nowrap;
  user-select: none;
  will-change: transform, opacity, filter;
  opacity: 0;
}

/* ───── Nav ───── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(246, 243, 236, 0.78);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid var(--rule);
}
.nav-brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.nav-brand-bang { color: var(--terracotta); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--parchment) !important;
  padding: 10px 16px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.nav-cta:hover { background: var(--terracotta-deep); }
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ───── Hero ───── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--gutter) 80px;
  z-index: 2;
}
.hero-inner {
  max-width: 880px;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* ── Språk → Sprak! wordmark animation ── */
.brand {
  position: relative;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(96px, 18vw, 220px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  color: var(--ink);
  display: inline-block;
}
.brand-row { display: inline-block; position: relative; }
.bl { display: inline-block; }
.ba { position: relative; }
.brand-tail { display: inline-block; width: 0.32em; }

/* The å's ring — open circle matching Source Serif's diacritic.
   Lives over the 'a' so the wordmark reads as "Språk" initially. */
.brand-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 0.22em;
  height: 0.20em;
  border: 0.045em solid var(--ink);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transform: translate(0,0);
  transition:
    transform 1.05s cubic-bezier(.55, .04, .82, .42),
    background-color 0.28s ease,
    border-color 0.28s ease,
    width 0.28s ease,
    height 0.28s ease,
    opacity 0.28s ease;
}
.brand-ring.visible { opacity: 1; }
.brand-ring.fall  { transition: transform 1.0s cubic-bezier(.45,.05,.9,.4); }
.brand-ring.land  { transition: transform 0.5s cubic-bezier(.32,.7,.4,1.04); }
.brand-ring.dot {
  background: var(--terracotta);
  border-color: var(--terracotta);
  width: 0.16em;
  height: 0.16em;
  transition: background-color 0.3s ease, border-color 0.3s ease,
              width 0.3s ease, height 0.3s ease;
}

/* Standalone dot that takes over once the ring lands — gives a clean
   landing target so the visible dot is unmistakably a period. */
.brand-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  background: var(--terracotta);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.brand-dot.show { opacity: 1; transform: scale(1); }

/* The exclamation that grows from the dot. */
.brand-bang {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1em;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0;
  transform-origin: 50% 100%;
  transform: scale(0.35) translateY(0.4em);
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(.3,.7,.35,1.08);
}
.brand-bang.show { opacity: 1; transform: scale(1) translateY(0); }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: -8px 0 32px;
}
.hero-eyebrow em { letter-spacing: 0; text-transform: none; color: var(--terracotta); }

.hero-tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin-bottom: 22px;
}
.hero-tagline-third {
  font-style: italic;
  color: var(--terracotta);
}
.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 40px;
  text-wrap: pretty;
}

/* ───── Waitlist form ───── */
.waitlist {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03), 0 18px 40px -28px rgba(60,40,20,0.25);
}
.waitlist input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  padding: 10px 4px;
  background: transparent;
  color: var(--ink);
}
.waitlist input::placeholder { color: var(--ink-faint); }
.waitlist button {
  border: 0;
  background: var(--ink);
  color: var(--parchment);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background .2s ease, transform .2s ease;
}
.waitlist button:hover { background: var(--terracotta-deep); transform: translateY(-1px); }
.waitlist button span { display: inline-block; transition: transform .2s ease; margin-left: 6px; }
.waitlist button:hover span { transform: translateX(3px); }

/* mailto CTA pill */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  padding: 16px 28px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: background .2s ease, transform .2s ease;
  box-shadow: 0 18px 40px -28px rgba(60,40,20,0.5);
}
.cta-link:hover { background: var(--terracotta-deep); transform: translateY(-1px); }
.cta-link span { transition: transform .2s ease; }
.cta-link:hover span { transform: translateX(3px); }
.cta-link-large { font-size: 16px; padding: 18px 32px; }

/* ─── Supported languages table ─── */
.section-langs-table {
  background: var(--parchment-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.langs-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.langs-title {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 14px 0 22px;
}
.langs-lede {
  max-width: 640px;
  margin-bottom: 44px;
  color: var(--ink-soft);
}
.langs-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 32px;
  row-gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.langs-grid li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
}
.lg-name {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}
.lg-native {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-align: right;
}
.langs-foot {
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.langs-foot a {
  color: var(--terracotta-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 1px;
}
@media (max-width: 880px) {
  .langs-grid { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
}
@media (max-width: 480px) {
  .langs-grid { grid-template-columns: 1fr; }
  .lg-native { font-size: 11px; }
}

/* swipe hint overlay on translation phone */
.swipe-hint {
  position: absolute;
  bottom: 13%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}
.swipe-hint svg { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25)); }
.swipe-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 4px 8px;
  border-radius: 999px;
}
.phone-cycle.swipe-on .swipe-hint {
  animation: swipeHint 2.6s ease-in-out infinite;
}
@keyframes swipeHint {
  0%   { opacity: 0; transform: translate(calc(-50% + 50px), 0); }
  18%  { opacity: 1; }
  60%  { opacity: 1; transform: translate(calc(-50% - 50px), 0); }
  80%  { opacity: 0; transform: translate(calc(-50% - 50px), 0); }
  100% { opacity: 0; transform: translate(calc(-50% + 50px), 0); }
}
.phone-cycle .phone-img {
  transition: opacity 0.55s ease;
}

.hero-fineprint {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-fineprint .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--forest-soft);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(63,136,112,0.18);
}

/* ───── Sections ───── */
.section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  z-index: 2;
}
.section-alt {
  background: var(--parchment-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.section-grid-flip { direction: rtl; }
.section-grid-flip > * { direction: ltr; }

@media (max-width: 880px) {
  .section-grid { grid-template-columns: 1fr; }
  .section-grid-flip { direction: ltr; }
}

.bullets {
  list-style: none;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bullets li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}
.bullets-tight li { padding-top: 10px; }
.b-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--terracotta);
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.strike {
  position: relative;
  display: inline-block;
}
.strike::after {
  content: "";
  position: absolute;
  left: -0.04em; right: -0.04em;
  top: 56%;
  height: 0.08em;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(.7,.0,.3,1);
}
.strike.struck::after { transform: scaleX(1); }

/* ───── Phone mockup ───── */
.phone {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.phone-shell {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 720 / 1544;
  background: #1a1a1a;
  padding: 10px;
  border-radius: 44px;
  box-shadow:
    0 0 0 1.5px rgba(0,0,0,0.4),
    0 30px 60px -30px rgba(80,50,30,0.45),
    0 60px 100px -50px rgba(80,50,30,0.35);
  position: relative;
}
.phone-shell::before {
  /* speaker */
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 5px;
  background: #2a2a2a;
  border-radius: 999px;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--parchment);
  position: relative;
}
.phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.phone-cycle .phone-img {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.phone-cycle .phone-img.active { opacity: 1; }

.phone-flag {
  position: absolute;
  top: 24px; left: -22px;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 28px;
  box-shadow: 0 12px 28px -16px rgba(60,40,20,0.5);
  display: grid;
  place-items: center;
}
.phone-flag .flag {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity .5s ease, transform .5s ease;
}
.phone-flag .flag.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.phone-caption {
  position: absolute;
  bottom: -56px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.phone-caption span {
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}
.phone-caption span.active { opacity: 1; }

/* Two-up phones — overlapping, fanned */
.section-visual-double {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.65;
  max-width: 520px;
  margin: 0 auto;
}
.phone-back, .phone-front {
  position: absolute;
  display: block;
  width: 60%;
}
.phone-back {
  top: 0;
  right: 0;
  transform: rotate(5deg);
  opacity: 0.96;
  z-index: 1;
}
.phone-front {
  bottom: 0;
  left: 0;
  width: 66%;
  transform: rotate(-4deg);
  z-index: 2;
}
.phone-back .phone-shell,
.phone-front .phone-shell { max-width: none; width: 100%; }

/* Mobile: drop the fan, stack cleanly so phones never overlap text */
@media (max-width: 720px) {
  .section-visual-double {
    aspect-ratio: auto;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 12px 0;
  }
  .phone-back, .phone-front {
    position: static;
    width: 88%;
    transform: rotate(2deg);
  }
  .phone-back  { align-self: flex-end; }
  .phone-front { align-self: flex-start; transform: rotate(-2deg); }
}

/* ───── Group bubbles ───── */
.group-bubbles {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
}
.g-bubble {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 14px 18px;
  border-radius: 18px 18px 18px 6px;
  background: #fff;
  border: 1px solid var(--rule);
  font-size: 15px;
  box-shadow: 0 6px 18px -14px rgba(60,40,20,0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .6s ease;
}
.g-bubble.in { opacity: 1; transform: translateY(0); }
.g-pt { background: #FFFBF2; }
.g-sv { background: #F2F8F4; align-self: flex-end; border-radius: 18px 18px 6px 18px; margin-left: 40px; }
.g-en { background: #F5F1E6; }
.g-flag { font-size: 16px; }
.g-name {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.g-msg { font-family: var(--serif); font-style: italic; color: var(--ink); }

/* ───── Two-up cards ───── */
.twoup {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}
@media (max-width: 760px) { .twoup { grid-template-columns: 1fr; } }
.twoup-card {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
}
.twoup-card .lede { font-size: 16.5px; }
.twoup-img {
  margin-top: 28px;
  aspect-ratio: 720 / 900;
  border-radius: 14px;
  overflow: hidden;
  background: var(--parchment-deep);
  border: 1px solid var(--rule);
  position: relative;
}
.twoup-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ───── Privacy ───── */
.section-privacy {
  background: var(--ink);
  color: var(--parchment);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.privacy-inner { max-width: var(--max); margin: 0 auto; }
.privacy-inner .kicker { color: var(--forest-soft); }
.privacy-title { color: var(--parchment); margin-bottom: 60px; max-width: 16ch; }
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
@media (max-width: 760px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-item {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.privacy-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  color: var(--amber);
  margin-bottom: 16px;
}
.privacy-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 12px;
}
.privacy-body { color: rgba(246,243,236,0.65); font-size: 15.5px; line-height: 1.55; }

/* ───── CTA ───── */
.section-cta {
  text-align: center;
  background: var(--parchment-warm);
  padding-bottom: clamp(120px, 16vw, 200px);
}
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta-title { margin-bottom: 22px; }
.cta-lede { margin: 0 auto 36px; }
.waitlist-large { padding: 8px 8px 8px 26px; }
.waitlist-large input { font-size: 17px; padding: 14px 4px; }
.waitlist-large button { padding: 14px 26px; font-size: 15px; }
.cta-tiny {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ───── Footer ───── */
.foot {
  border-top: 1px solid var(--rule);
  padding: 28px var(--gutter);
  background: var(--parchment);
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.foot-mark { font-family: var(--serif); font-size: 16px; color: var(--ink); text-transform: none; letter-spacing: -0.01em; }
.foot-bang { color: var(--terracotta); }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--ink); }

/* ───── Reveal ───── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
