/* Fonts: self-hosted from Google Fonts (SIL Open Font License).
   Newsreader roman is variable (opsz 6 to 72, wght 400 to 500) so large headings get the display cut.
   Newsreader italic is a static opsz 24 instance: it only sets the tagline and the index heading. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/newsreader-roman-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/newsreader-roman-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/newsreader-roman-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-italic-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-roman-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-roman-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens mirror the Figma "Color" collection (Light / Dark modes). */
:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --subtle: #eae7df;
  --subtle-hover: #dfdbd1;
  --text: #16181d;
  --text-2: #565b66;
  --line: #dcd9d0;
  --accent: #0e52d7;
  --accent-hover: #0b45b8;
  --accent-text: #0e52d7;
  --on-accent: #ffffff;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* 20px at 390 wide, 120px at 1440 wide, matching the Figma frames */
  --gutter: clamp(20px, 9.524vw - 17.14px, 120px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1c1d21;
    --subtle: #2a2c31;
    --subtle-hover: #353840;
    --text: #f2f0ea;
    --text-2: #a6a9b1;
    --line: #2e3035;
    --accent: #2f6bf0;
    --accent-hover: #2558cf;
    --accent-text: #8aaeff;
    --on-accent: #ffffff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, dl, dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent-text);
}

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

::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.wrap {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.squircle {
  /* iOS app-icon corner ratio: the photo shares the icons' shape */
  border-radius: 22.37%;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--on-accent);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 500 1.5rem/1.15 var(--serif);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header ul {
  display: flex;
  gap: 24px;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  display: grid;
  gap: 28px;
  padding-block: 40px 88px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.byline img {
  width: 72px;
  height: 72px;
  flex: none;
}

.byline p {
  display: grid;
  gap: 2px;
}

.byline-name {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.byline-role {
  color: var(--text-2);
}

h1 {
  max-width: 15.75em;
  font: 400 clamp(2.375rem, 1.55rem + 3.4vw, 4rem)/1.08 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: -8px;
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  font-size: 1rem;
}

/* Sections */
h2 {
  font: 400 clamp(2.125rem, 1.7rem + 1.4vw, 3rem)/1.1 var(--serif);
  letter-spacing: -0.01em;
}

.apps,
.about {
  scroll-margin-top: 24px;
  padding-bottom: 96px;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.section-head p {
  color: var(--text-2);
  max-width: 26em;
}

/* Featured app */
.feature {
  display: grid;
  gap: 24px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
}

.feature-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.feature-copy p {
  max-width: 34em;
}

.feature-icon {
  width: 88px;
  height: 88px;
}

.feature hgroup {
  display: grid;
  gap: 4px;
}

.feature h3 {
  font: 400 clamp(1.875rem, 1.6rem + 0.9vw, 2.5rem)/1.1 var(--serif);
  letter-spacing: -0.005em;
}

.subtitle,
.platforms {
  color: var(--text-2);
}

.platforms {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.tagline {
  font: italic 400 clamp(1.375rem, 1.25rem + 0.4vw, 1.625rem)/1.3 var(--serif);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--subtle);
  color: var(--text);
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--subtle-hover);
  color: var(--text);
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.shots {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.shots li {
  flex: 1 1 0;
  min-width: 0;
}

.shots li:nth-child(odd) {
  margin-top: 20px;
}

.shots img {
  width: 100%;
  border-radius: 12px;
}

/* App index */
.index {
  margin-top: 48px;
}

.index-title {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font: italic 400 clamp(1.375rem, 1.25rem + 0.4vw, 1.625rem)/1.3 var(--serif);
}

.app-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.app-row img {
  width: 56px;
  height: 56px;
}

.app-text h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  font-weight: inherit;
}

.app-name {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.app-kind {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.app-text p {
  margin-top: 4px;
  color: var(--text-2);
}

/* The app's own website: a text link, lighter than the store button */
.app-site {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: -10px;
  font-weight: 500;
  font-size: 1rem;
}

.app-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-meta .button {
  order: -1;
}

/* About */
.about {
  display: grid;
  gap: 24px;
}

.about-body {
  display: grid;
  gap: 32px;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: 36em;
  font: 400 clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem)/1.55 var(--serif);
  text-wrap: pretty;
}

.facts {
  border-bottom: 1px solid var(--line);
}

.facts > div {
  display: grid;
  gap: 4px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* Footer */
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px 32px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.footer-row p {
  color: var(--text-2);
}

.footer-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Tablet and up */
@media (min-width: 768px) {
  body {
    font-size: 1.125rem;
  }

  .site-header {
    padding-block: 24px;
  }

  .site-header ul {
    gap: 32px;
  }

  .hero {
    gap: 40px;
    padding-block: 88px 136px;
  }

  .byline {
    gap: 20px;
  }

  .byline img {
    width: 96px;
    height: 96px;
  }

  .social {
    gap: 0 28px;
  }

  .apps,
  .about {
    padding-bottom: 144px;
  }

  .section-head {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
    margin-bottom: 48px;
  }

  .section-head p {
    max-width: 400px;
  }

  .feature {
    gap: 32px;
    padding: 32px;
  }

  .feature-copy {
    gap: 28px;
  }

  .feature-icon {
    width: 112px;
    height: 112px;
  }

  .actions {
    gap: 12px;
  }

  .shots {
    gap: 16px;
  }

  .shots li:nth-child(odd) {
    margin-top: 32px;
  }

  .shots img {
    border-radius: 20px;
  }

  .index {
    margin-top: 72px;
  }

  .index-title {
    padding-bottom: 20px;
  }

  .about-body {
    gap: 48px;
  }

  .prose {
    gap: 20px;
  }

  .facts > div {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
    padding-block: 18px;
  }

  .footer-row {
    padding-block: 16px 40px;
  }
}

/* App rows go to one line once there is room for platforms and the store link */
@media (min-width: 900px) {
  .app-row {
    grid-template-columns: 72px minmax(0, 1fr) 150px auto;
    gap: 28px;
    align-items: center;
    padding-block: 28px;
  }

  .app-row img {
    width: 72px;
    height: 72px;
  }

  .app-meta {
    display: contents;
  }

  .app-meta .button {
    order: 0;
  }
}

/* About heading gets its own column; at 1440 it lands on the design's 440 + 704 split */
@media (min-width: 1024px) {
  .about {
    grid-template-columns: minmax(160px, 1fr) minmax(0, 704px);
    align-items: start;
    gap: 56px;
  }
}

/* Copy beside screenshots once the screenshots can stay readable (about 150px each) */
@media (min-width: 1200px) {
  .feature {
    grid-template-columns: minmax(360px, 1fr) minmax(0, 608px);
    align-items: center;
    gap: 40px;
    padding: 48px;
    border-radius: 32px;
  }
}

@media (min-width: 1400px) {
  .feature {
    padding: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
