/* ==========================================================================
   Lyfna — lyfna.com
   Rak, gedigen, varm. Papper + granskog. Young Serif / Schibsted Grotesk.
   ========================================================================== */

:root {
  /* Color — OKLCH, warm paper tinted toward the spruce hue */
  --paper:      oklch(0.966 0.011 95);
  --paper-deep: oklch(0.938 0.016 95);
  --ink:        oklch(0.26 0.02 130);
  --ink-soft:   oklch(0.42 0.02 130);
  --ink-faint:  oklch(0.55 0.018 130);
  --line:       oklch(0.86 0.018 110);
  --spruce:     oklch(0.42 0.075 155);
  --spruce-deep:oklch(0.34 0.07 155);
  --amber:      oklch(0.74 0.13 75);

  /* Type */
  --font-display: "Young Serif", "Georgia", serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", sans-serif;

  /* Space — 4pt scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: clamp(6rem, 12vw, 10rem);

  --measure: 62ch;
  --page-pad: clamp(1.25rem, 5vw, 4rem);
}

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

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

body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

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

a { color: inherit; }

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--page-pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mark {
  width: 1.9rem;
  height: 1.9rem;
  display: block;
  transform: translateY(-0.05em);
}

.wordmark-dot {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.14em;
  background: var(--spruce);
  border-radius: 50%;
  transform: translateY(-0.55em);
}

.topbar-nav {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}

.topbar-link {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  padding: var(--space-xs) 0;
}
.topbar-link:hover { color: var(--ink); }

.topbar-tel {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--spruce-deep);
  padding: var(--space-xs) 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.topbar-tel:hover { color: var(--spruce); }

@media (max-width: 560px) {
  .topbar-link { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-2xl) var(--page-pad) var(--space-xl);
  max-width: 72rem;
}

.hero-kicker {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 8.5vw, 6.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 14ch;
}
.hero-title span { display: block; }

.hero-title em.lyft {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
/* The "lyft": an underline that kicks upward at its end, kept inside the line box */
.hero-title em.lyft::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: -0.02em;
  top: 0.9em;
  height: 0.11em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 40 10.5, 72 10, 91 6 L 98 2' stroke='%232e5941' stroke-width='3.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: left center;
  transition: background-size 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s;
}
html.drawn .hero-title em.lyft::after { background-size: 100% 100%; }

/* The rejected words: thin, hand-set strike in faded ink */
.hero-title s.no {
  text-decoration: none;
  position: relative;
  color: var(--ink-soft);
}
.hero-title s.no::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.06em;
  top: 0.52em;
  height: 0.06em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.5 C 30 3.5, 70 4.5, 99 3' stroke='%23575b4e' stroke-width='2.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: left center;
  transition: background-size 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
html.drawn .hero-title s.no::after { background-size: 100% 100%; }
.hero-title s.no:nth-of-type(1)::after { transition-delay: 1.1s; }
.hero-title s.no:nth-of-type(2)::after { transition-delay: 1.35s; }

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
  gap: var(--space-lg) var(--space-xl);
  margin-top: var(--space-xl);
  align-items: start;
}

.hero-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-cta-note {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-top: var(--space-xs);
}

@media (max-width: 760px) {
  .hero-split { grid-template-columns: 1fr; }
}

.hero-media {
  margin-top: var(--space-xl);
  border-radius: 18px;
  overflow: hidden;
  max-height: 76vh;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 76vh;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.07);
  will-change: transform;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--spruce);
  color: oklch(0.97 0.01 95);
}
.btn-primary:hover { background: var(--spruce-deep); }

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.btn-ghost:hover { border-color: var(--spruce); color: var(--spruce-deep); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xs) var(--space-md);
  align-items: baseline;
  margin-bottom: var(--space-xl);
}

.section-no {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--spruce);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

.section-sub {
  grid-column: 2;
  color: var(--ink-faint);
  font-size: 1rem;
}

/* ==========================================================================
   Bevis / cases
   ========================================================================== */

.proof {
  padding: var(--space-2xl) var(--page-pad);
  border-top: 1px solid var(--line);
  max-width: 76rem;
}

.case {
  display: grid;
  grid-template-columns: minmax(15rem, 2fr) 3fr;
  gap: var(--space-md) var(--space-xl);
  padding: var(--space-xl) 0;
  align-items: start;
}
.case + .case { border-top: 1px solid var(--line); }

.case-figure { display: grid; gap: var(--space-xs); }

.case-number {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--spruce-deep);
  font-variant-numeric: tabular-nums;
}

.case-from { color: var(--ink-faint); }

.case-figure-label {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.case-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1875rem;
  margin-bottom: var(--space-sm);
}

.case-vertical {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 1rem;
}

.case-text {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.case-date {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.proof-note {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  font-size: 0.9375rem;
  color: var(--ink-faint);
  max-width: var(--measure);
}

@media (max-width: 760px) {
  .case { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Så funkar det
   ========================================================================== */

.how {
  padding: var(--space-2xl) var(--page-pad);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  max-width: none;
}

.how .section-head { max-width: 76rem; }

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
  gap: var(--space-xl);
  max-width: 76rem;
  align-items: start;
}

.how-media {
  position: sticky;
  top: 6rem;
  border-radius: 14px;
  overflow: hidden;
}

.how-media img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-media { position: static; max-height: 55vh; }
  .how-media img { object-fit: cover; max-height: 55vh; }
}

.steps {
  list-style: none;
  display: grid;
  gap: var(--space-lg);
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-md);
  align-items: start;
  max-width: 54rem;
}

/* steps 2 & 3 shift right — the layout itself lifts upward/forward */
.step:nth-child(2) { margin-left: clamp(0rem, 6vw, 5rem); }
.step:nth-child(3) { margin-left: clamp(0rem, 12vw, 10rem); }

.step-no {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--spruce);
  min-width: 2ch;
  text-align: right;
}

.step-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1875rem;
  margin-bottom: var(--space-xs);
}

.step-text {
  color: var(--ink-soft);
  max-width: var(--measure);
}

@media (max-width: 760px) {
  .step:nth-child(2), .step:nth-child(3) { margin-left: 0; }
}

/* ==========================================================================
   För vem
   ========================================================================== */

.who {
  padding: var(--space-xl) var(--page-pad);
  border-top: 1px solid var(--line);
}

.who-line {
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  line-height: 1.6;
  max-width: 46rem;
  font-weight: 500;
}

.who-verticals {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--spruce-deep);
}

.who-media {
  margin: var(--space-xl) calc(-1 * var(--page-pad)) calc(-1 * var(--space-xl));
  overflow: hidden;
}

.who-media img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: cover;
  object-position: center 62%;
}

/* ==========================================================================
   Kontakt
   ========================================================================== */

.contact {
  padding: var(--space-2xl) var(--page-pad);
  border-top: 1px solid var(--line);
  max-width: 76rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 1fr);
  gap: var(--space-lg) var(--space-xl);
}

.contact-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.contact-actions { display: grid; gap: var(--space-sm); align-content: start; }

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  text-decoration: none;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}
.contact-row:first-child { border-top: 1px solid var(--line); }
.contact-row:hover { border-bottom-color: var(--spruce); }
.contact-row:hover .contact-value { color: var(--spruce-deep); }

.contact-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.contact-value {
  font-weight: 700;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  transition: color 0.25s ease;
}

.contact-person {
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--ink-faint);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-lg) var(--page-pad);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--ink); }

.footer-mark { font-family: var(--font-display); font-size: 1rem; color: var(--ink-soft); }

.footer-note { font-size: 0.8125rem; }

/* ==========================================================================
   Reveal motion — transform/opacity only, ease-out-quint
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-img {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-img img {
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-img.is-visible { opacity: 1; }
.reveal-img.is-visible img { transform: scale(1); }

/* hero img parallax layer keeps a slight overscale via JS; others settle to 1 */
.how-media img, .who-media img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-img {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-img img, .how-media img, .who-media img, .hero-media img {
    transform: none;
    transition: none;
  }
  .hero-title em.lyft::after,
  .hero-title s.no::after {
    background-size: 100% 100%;
    transition: none;
  }
}
