@font-face {
  font-family: "ETBembo";
  src: url("https://static.noahbjorner.com/ETBembo/ETBembo-600.woff2")
    format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Himmel iOS semantic colors — light appearance only. */
  --color-background-primary: #ffffff;
  --color-background-secondary: rgb(245, 245, 245);
  --color-background-tertiary: #dadada;
  --color-text-primary: #181818;
  --color-text-secondary: #8c8c8c;
  --color-text-tertiary: #bebebe;
  --color-border: #f2f2f2;
  --color-glass-border: #ffffff;
  --color-glass-overlay: rgb(0 0 0 / 4%);
  --color-accent: #181818;

  /* Himmel iOS 4px spacing grid — Spacing.sN maps to --space-N. */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-13: 52px;
  --space-14: 56px;
  --space-15: 60px;
  --space-16: 64px;
  --space-17: 68px;
  --space-18: 72px;
  --space-19: 76px;
  --space-20: 80px;
  --space-21: 84px;
  --space-22: 88px;
  --space-23: 92px;
  --space-24: 96px;

  /* Tailwind font-size scale */
  --text-xs: 0.75rem; /* 12px */
  --text-xs--line-height: calc(1 / 0.75);
  --text-sm: 0.875rem; /* 14px */
  --text-sm--line-height: calc(1.25 / 0.875);
  --text-base: 1rem; /* 16px */
  --text-base--line-height: calc(1.5 / 1);
  --text-lg: 1.125rem; /* 18px */
  --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem; /* 20px */
  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem; /* 24px */
  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem; /* 30px */
  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem; /* 36px */
  --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem; /* 48px */
  --text-5xl--line-height: 1;
  --text-6xl: 3.75rem; /* 60px */
  --text-6xl--line-height: 1;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-background-primary);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.text-xs {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.text-sm {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.text-base {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.text-lg {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
}

.text-xl {
  font-size: var(--text-xl);
  line-height: var(--text-xl--line-height);
}

.text-2xl {
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
}

.text-3xl {
  font-size: var(--text-3xl);
  line-height: var(--text-3xl--line-height);
}

.text-4xl {
  font-size: var(--text-4xl);
  line-height: var(--text-4xl--line-height);
}

.text-5xl {
  font-size: var(--text-5xl);
  line-height: var(--text-5xl--line-height);
}

.text-6xl {
  font-size: var(--text-6xl);
  line-height: var(--text-6xl--line-height);
}

a {
  color: inherit;
  text-decoration: none;
}

.landing-page {
  display: grid;
  grid-template-columns: 50% minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "visual identity"
    "visual content";
  min-height: 100vh;
  background: var(--color-background-primary);
}

.app-identity {
  grid-area: identity;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-12) 0;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

.visual-column {
  grid-area: visual;
  min-width: 0;
  padding: var(--space-3);
}

.preview-block {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - var(--space-6));
  overflow: hidden;
  border-radius: 20px;
  background: transparent;
}

.background-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.iphone-mockup {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: min(84%, 620px);
  max-width: 80%;
  aspect-ratio: 300 / 620;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 28px 34px rgb(0 0 0 / 0.28));
}

.iphone-screen {
  position: absolute;
  inset: calc(12 / 620 * 100%) calc(12 / 300 * 100%);
  z-index: 1;
  overflow: hidden;
  /* Match SVG inner rx=51 on the 276×596 screen */
  border-radius: calc(51 / 276 * 100%) / calc(51 / 596 * 100%);
  background: #111;
}

.iphone-screen-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.iphone-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.demo-playback {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 3;
  display: grid;
  place-items: center;
  width: var(--space-11);
  height: var(--space-11);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 85%);
  -webkit-backdrop-filter: blur(var(--space-4));
  backdrop-filter: blur(var(--space-4));
  color: var(--color-text-primary);
  cursor: pointer;
  appearance: none;
  transition:
    transform 160ms cubic-bezier(0.2, 0, 0, 1),
    background-color 160ms cubic-bezier(0.2, 0, 0, 1);
}

.demo-playback:hover {
  background: rgb(255 255 255 / 62%);
}

.demo-playback:active {
  transform: scale(0.96);
}

.demo-playback:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

.demo-playback-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: rotate(-90deg);
}

.demo-playback-ring-track,
.demo-playback-ring-progress {
  stroke-width: 2;
}

.demo-playback-ring-track {
  stroke: rgba(255, 255, 255, 0.9);
}

.demo-playback-ring-progress {
  stroke: var(--color-text-primary);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.demo-playback-icons {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--space-7);
  height: var(--space-7);
}

.demo-playback-icon {
  grid-area: 1 / 1;
  display: block;
  width: var(--space-7);
  height: var(--space-7);
  opacity: 0;
  filter: blur(var(--space-1));
  transform: scale(0.25);
  transition:
    opacity 220ms cubic-bezier(0.2, 0, 0, 1),
    filter 220ms cubic-bezier(0.2, 0, 0, 1),
    transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.demo-playback-icon-play {
  transform: scale(0.25);
  translate: -0.5px 0px;
}

.demo-playback[data-state="playing"] .demo-playback-icon-pause,
.demo-playback[data-state="paused"] .demo-playback-icon-play {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.demo-playback[data-state="paused"] .demo-playback-icon-play {
  transform: scale(1);
}

.content-column {
  grid-area: content;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0 var(--space-12) var(--space-8);
}

.intro {
  display: flex;
  flex: 1;
  align-items: center;
  padding-left: 0;
}

.intro-inner {
  width: 100%;
}

.app-identity-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.app-identity-brand p {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
}

.app-icon {
  display: block;
  width: var(--space-6);
  height: var(--space-6);
  flex: 0 0 auto;
}

.intro h1 {
  max-width: 500px;
  margin: 0 0 var(--space-2);
  font-family: "ETBembo", Georgia, serif;
  font-size: clamp(var(--text-4xl), 3.6vw, var(--text-5xl));
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.intro p {
  max-width: 510px;
  margin: 0 0 var(--space-8);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  width: 100%;
}

.content-grid-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 5 / 4;
  padding: var(--space-4);
  border-radius: var(--space-4);
  background: var(--color-background-secondary);
  margin: 0;
}

.content-grid-cell p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  flex: 0 0 auto;
  max-width: none;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.content-grid-cell span {
  color: var(--color-text-primary);
  font-weight: 500;
}

.cta {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: var(--space-9);
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-4);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-background-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.cta:hover {
  opacity: 0.9;
}

.cta:active {
  transform: scale(0.97);
}

.cta:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

.footer {
  display: flex;
  min-height: var(--space-5);
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  padding: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer a {
  transition: color 180ms ease;
}

.footer a:hover {
  color: var(--color-text-primary);
}

.footer p {
  margin: 0;
  white-space: nowrap;
}

.made-in-sweden {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  transition: color 180ms ease;
}

.made-in-sweden:hover {
  color: var(--color-text-primary);
}

.sweden-flag {
  display: block;
  width: 18px;
  height: auto;
  flex: 0 0 auto;
  color: inherit;
}

.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-12) var(--space-10);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  transition: opacity 180ms ease;
}

.legal-brand:hover {
  opacity: 0.7;
}

.legal-brand:focus-visible,
.legal-back:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

.legal-back {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--text-sm--line-height);
  transition: color 180ms ease;
}

.legal-back:hover {
  color: var(--color-text-primary);
}

.legal-content {
  flex: 1;
}

.legal-eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: var(--text-sm--line-height);
}

.legal-content h1 {
  margin: 0 0 var(--space-3);
  font-family: "ETBembo", Georgia, serif;
  font-size: clamp(var(--text-4xl), 5vw, var(--text-5xl));
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.12;
  text-wrap: balance;
}

.legal-updated {
  margin: 0 0 var(--space-10);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.legal-content h2 {
  margin: var(--space-10) 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: var(--text-lg--line-height);
}

.legal-content p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  line-height: 1.65;
  text-wrap: pretty;
}

.legal-footer {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.footer a[aria-current="page"] {
  color: var(--color-text-primary);
}

.contact-email {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-text-tertiary);
  text-underline-offset: 0.18em;
  transition: text-decoration-color 180ms ease;
}

.contact-email:hover {
  text-decoration-color: var(--color-text-primary);
}

.contact-email:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

.contact-section + .contact-section {
  margin-top: var(--space-2);
}

.contact-subject {
  display: inline-block;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 550;
  letter-spacing: 0.04em;
}

.contact-cta {
  margin-top: var(--space-2);
}

@media (max-width: 900px) {
  .landing-page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "identity"
      "visual"
      "content";
  }

  .app-identity {
    padding: var(--space-4) var(--space-8) var(--space-3);
  }

  .visual-column {
    height: min(58vh, 560px);
    padding: 0 var(--space-3) 0;
  }

  .preview-block {
    min-height: 0;
  }

  .demo-playback {
    right: var(--space-3);
    bottom: var(--space-3);
  }

  .content-column {
    padding: 0 var(--space-8) var(--space-6);
  }

  .intro {
    padding: var(--space-10) 0 var(--space-12);
  }

  .intro-inner {
    width: 100%;
  }

  h1 {
    margin-bottom: var(--space-7);
    font-size: clamp(var(--text-4xl), 8vw, var(--text-5xl));
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .content-grid-cell {
    padding: var(--space-3);
    border-radius: var(--space-3);
  }

  .footer {
    padding: var(--space-6) 0 var(--space-2);
  }

  .legal-page {
    padding: var(--space-6) var(--space-8) var(--space-8);
  }

  .legal-header {
    margin-bottom: var(--space-12);
  }

  .legal-updated {
    margin-bottom: var(--space-8);
  }

  .legal-footer {
    margin-top: var(--space-12);
  }
}

@media (max-width: 560px) {
  .app-identity {
    padding: var(--space-5);
  }

  .visual-column {
    height: 46vh;
    padding: 0 var(--space-2);
  }

  .preview-block {
    border-radius: 16px;
  }

  .iphone-mockup {
    height: 80%;
  }

  .content-column {
    padding: 0 var(--space-5) var(--space-5);
  }

  .intro {
    padding: var(--space-8) 0 var(--space-8);
  }

  .intro-inner > p {
    margin-bottom: var(--space-8);
  }

  h1 {
    letter-spacing: -0.05em;
  }

  .cta {
    min-height: var(--space-8);
    padding: var(--space-1) var(--space-4);
  }

  .footer {
    display: block;
  }

  .footer p {
    margin-top: 18px;
    white-space: normal;
  }

  .legal-page {
    padding: var(--space-5) var(--space-5) var(--space-6);
  }

  .legal-header {
    margin-bottom: var(--space-10);
  }

  .legal-content h1 {
    letter-spacing: -0.05em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .footer a,
  .demo-playback,
  .demo-playback-icon {
    transition: none;
  }

  .demo-playback:active {
    transform: none;
  }

  .demo-playback-icon {
    filter: none;
    transform: none;
  }

  .demo-playback-icon-play,
  .demo-playback[data-state="paused"] .demo-playback-icon-play {
    transform: translateX(-1px);
  }
}
