/* Shinycast — shinycast.com
   The app's look (Shinycast/Support/Theme.swift) in light and dark:
   flat pages with hairlines, square-cornered grey keys, one orange that
   goes only on shapes. Archivo for titles, Martian Mono for readouts
   (prices, dates, versions), the system font (SF Pro on Apple devices)
   for everything else. The hero is the icon itself: its rings around
   the phone, its orange bar under it. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/MartianMono.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

/* Tokens: Theme.swift's light set, then its dark set. */

:root {
  --bg: #f3f5f4;
  --card: #fbfcfb;
  --key: #e8ebea;
  --line: rgba(14, 15, 15, 0.12);
  --ink: #0e0f0f;
  --ink-secondary: #5f6462;
  --ink-tertiary: #8d9290;
  --rings: #4a5153; /* the icon's rings in light mode */
  --accent: #f54e00; /* AccentColor */
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(14, 15, 15, 0.08), 0 18px 48px -12px rgba(14, 15, 15, 0.28);
  /* The same shadow for a shape that isn't a box: the framed devices. */
  --drop-shadow: drop-shadow(0 1px 1px rgba(14, 15, 15, 0.08)) drop-shadow(0 16px 24px rgba(14, 15, 15, 0.2));

  --max: 1160px;
  --gutter: 32px;
  --measure: 34em;

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Archivo", var(--font-text);
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --card: #1a1d1c;
    --key: #1f2321;
    --line: rgba(255, 255, 255, 0.12);
    --ink: #f2f4f3;
    --ink-secondary: #a9aeac;
    --ink-tertiary: #6e7270;
    --rings: #d9dfdd;
    --accent: #ff7438; /* the icon's bar in dark mode */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -12px rgba(0, 0, 0, 0.7);
    --drop-shadow: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55));
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* Links read as text, as in the app: ink with a grey underline. */
a {
  color: var(--ink);
  text-decoration-color: var(--ink-tertiary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  z-index: 10;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Type */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 88%;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.mono {
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-size: 0.82em;
}

.secondary {
  color: var(--ink-secondary);
}

/* Header */

.site-header .wrap {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wordmark img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--line);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--ink-secondary);
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

/* Footer: links, then who provides the site (required by Finnish law). */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.site-footer .wrap {
  padding-top: 36px;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 48px;
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer nav a {
  text-decoration: none;
}

.site-footer nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-tertiary);
}

.provider {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 52em;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.provider a {
  color: inherit;
}

.copyright {
  color: var(--ink-secondary);
  justify-self: end;
}

/* Keys: the app's square-cornered grey buttons. */

.key {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--key);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.key:hover {
  border-color: var(--ink-tertiary);
}

/* App Store button. Until launch it's a "Coming soon" label (.is-soon),
   not a link, drawn as a grey key so it doesn't read as a button.
   TODO: at launch, link it and swap in Apple's official "Download on the
   App Store" badge (developer.apple.com/app-store/marketing/guidelines/). */

.app-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 22px 0 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  line-height: 1.1;
}

.app-store:hover {
  color: var(--bg);
  opacity: 0.88;
}

.app-store.is-soon {
  margin: 0;
  background: var(--key);
  color: var(--ink);
  border: 1px solid var(--line);
}

.app-store svg {
  width: 24px;
  height: 28px;
  fill: currentColor;
}

.app-store small {
  display: block;
  font-size: 11px;
  font-weight: 500;
}

.app-store span {
  display: block;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Devices: screenshots already in Apple's device frames (frames-cli),
   transparent around the frame. --w sets the width. */

.phone,
.tablet {
  --w: 300px;
  width: var(--w);
  flex: none;
  filter: var(--drop-shadow);
}

.phone img,
.tablet img {
  display: block;
  width: 100%;
  height: auto;
}

/* Home: hero */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-top: 24px;
  padding-bottom: 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.88;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.035em;
}

.hero .lede {
  margin: 0;
  max-width: 24em;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.45;
  color: var(--ink-secondary);
}

.hero .lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero .requires {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

/* The icon around the phone: three split rings, the phone where the
   dot is, the orange bar under it. The box is the icon's own crop
   (x 112–912, y 66–946 of its 1024), so the bar and the rings sit where
   they do in the icon, and the phone is sized from the box's width so it
   always ends above the bar. */

.signal {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 800 / 880;
  width: 100%;
  container-type: inline-size;
}

.signal .rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--rings);
  opacity: 0.16;
}

.signal .phone {
  --w: 43cqw;
  position: relative;
}

.signal .bar {
  position: absolute;
  left: 50%;
  top: 94.43%;
  width: 16%;
  height: 5%;
  translate: -50% 0;
  border-radius: 999px;
  background: var(--accent);
}

/* Home: the app, screen by screen */

.section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 40em;
  margin-bottom: 48px;
}

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.6vw, 56px);
}

.section-head p {
  margin: 0;
  max-width: var(--measure);
  font-size: 18px;
  color: var(--ink-secondary);
}

/* A row of phones, like the App Store's screenshots; it scrolls
   sideways when the window is too narrow for all four. */

.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px var(--gutter) 40px;
  margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: thin;
}

.screens figure {
  margin: 0;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.screens .phone {
  --w: 100%;
  max-width: 270px;
}

.screens figcaption h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-stretch: 88%;
  font-size: 23px;
  line-height: 1.1;
}

.screens figcaption p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* Every device: the Mac window floats at the back right; the iPad
   stands in front at the left and the iPhone in front of the iPad's
   right edge, both on one baseline. Everything is sized from the
   stage's own width (cqw), so the group keeps its shape at every
   width. */

.devices .section-head {
  max-width: 40em;
}

.stage {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 100 / 56;
  container-type: inline-size;
}

/* A screenshot of the window itself; its corners are cut to the
   window's own radius. */
.window {
  --w: 74cqw;
  position: absolute;
  top: 0;
  right: 0;
  width: var(--w);
}

.window img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.024);
  box-shadow: var(--shadow);
  background: var(--card);
}

.stage .tablet {
  --w: 47cqw;
  position: absolute;
  left: 0;
  bottom: 0;
}

.stage .phone {
  --w: 15cqw;
  position: absolute;
  left: 41cqw;
  bottom: 0;
}

/* Also in the app: flat rows, two columns, like a settings list. */

.also {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  column-gap: 56px;
  margin: 0;
  border-top: 1px solid var(--line);
}

.also div {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.also dt {
  font-weight: 600;
}

.also dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
}

/* Privacy, said big */

.statement {
  margin: 0;
  max-width: 19em;
  font-family: var(--font-display);
  font-stretch: 88%;
  font-weight: 700;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.statement-note {
  margin: 28px 0 0;
  max-width: var(--measure);
  font-size: 18px;
  color: var(--ink-secondary);
}

/* Free and Plus */

.plans-note {
  margin: 20px 0 0;
  max-width: var(--measure);
  font-size: 15px;
  color: var(--ink-secondary);
}

.table-scroll {
  overflow-x: auto;
}

.compare {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-size: 16px;
}

.compare th,
.compare td {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  padding-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-bottom-color: var(--ink-tertiary);
}

.compare thead th:first-child,
.compare tbody th {
  text-align: left;
  font-weight: 500;
}

.compare .col {
  width: 96px;
  text-align: center;
}

@media (max-width: 640px) {
  .compare {
    font-size: 15px;
  }

  .compare .col {
    width: 56px;
  }

  .compare tbody th {
    padding-right: 12px;
  }
}

.compare .no {
  color: var(--ink-tertiary);
}

.check {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  stroke: var(--accent);
}

/* Closing call */

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.closing h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

/* Inner pages: privacy, terms, support */

.page {
  padding-top: 56px;
  padding-bottom: 104px;
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 64px;
  align-items: start;
}

.page-title {
  margin: 0 0 24px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.effective {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-size: 13px;
  color: var(--ink-secondary);
}

.toc {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  padding-top: 8px;
}

.toc p {
  margin: 0 0 4px;
  font-weight: 600;
}

.toc a {
  text-decoration: none;
  color: var(--ink-secondary);
}

.toc a:hover {
  color: var(--ink);
}

.legal h2 {
  font-family: var(--font-display);
  font-stretch: 88%;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  margin: 56px 0 14px;
  scroll-margin-top: 24px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 6px;
}

.legal p,
.legal li {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.legal ul {
  padding-left: 22px;
  margin: 0 0 14px;
}

.legal li {
  margin-bottom: 8px;
}

.summary {
  margin: 8px 0 32px;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.summary p {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
}

.details {
  margin: 0 0 14px;
  border-top: 1px solid var(--line);
}

.details div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.details dt {
  color: var(--ink-secondary);
}

.details dd {
  margin: 0;
}

/* Support */

.support {
  padding-top: 56px;
  padding-bottom: 104px;
}

.support-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 40px 64px;
  align-items: end;
  margin-bottom: 72px;
}

.support-head .lede {
  margin: 0;
  max-width: 30em;
  font-size: 19px;
  color: var(--ink-secondary);
}

.contact {
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact .address {
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
}

.contact p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.faq-group {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 64px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.faq-group > h2 {
  margin: 0;
  font-size: 24px;
  scroll-margin-top: 24px;
}

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px 48px;
}

.faq h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.faq p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.faq p + p {
  margin-top: 8px;
}

kbd {
  font-family: var(--font-text);
  font-size: 0.9em;
  padding: 1px 6px;
  background: var(--key);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
}

/* 404 */

.missing {
  padding-top: 96px;
  padding-bottom: 140px;
  max-width: 40em;
}

.missing p {
  font-size: 19px;
  color: var(--ink-secondary);
}

/* Narrower windows */

@media (max-width: 960px) {
  .hero .wrap,
  .page,
  .support-head,
  .faq-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .wrap {
    gap: 8px;
    padding-top: 16px;
  }

  .signal {
    max-width: 460px;
    justify-self: center;
  }

  .page {
    gap: 32px;
  }

  .toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
  }

  .toc p {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .site-header .wrap {
    height: 64px;
  }

  .wordmark span {
    display: none;
  }

  .nav {
    gap: 20px;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .screens {
    grid-auto-columns: 72%;
    gap: 20px;
  }

  .also div,
  .details div {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .copyright {
    justify-self: start;
  }
}
