/* SmartCut Calm palette, from UIColor+SmartCut.swift. */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --ink: #22201C;
  --ink-soft: #3D3931;
  --muted: #57534C;
  --accent: #1A5D4C;
  --accent-pressed: #124337;
  --accent-tint: #E6EFE9;
  --line: rgba(34, 32, 28, .1);
  --card-border: none;
  --light-only: block;
  --dark-only: none;
  --radius: 18px;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
}

/* The page follows the device unless the header switch chose a theme (data-theme on <html>).
   The two dark blocks hold the same values. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120F;
    --surface: #1E1B17;
    --ink: #F5F0E6;
    --ink-soft: #DCD5C8;
    --muted: #A8A093;
    --accent: #6FD3AE;
    --accent-pressed: #8FE0C2;
    --accent-tint: #17322A;
    --line: rgba(245, 240, 230, .12);
    --card-border: 1px solid var(--line);
    --light-only: none;
    --dark-only: block;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14120F;
  --surface: #1E1B17;
  --ink: #F5F0E6;
  --ink-soft: #DCD5C8;
  --muted: #A8A093;
  --accent: #6FD3AE;
  --accent-pressed: #8FE0C2;
  --accent-tint: #17322A;
  --line: rgba(245, 240, 230, .12);
  --card-border: 1px solid var(--line);
  --light-only: none;
  --dark-only: block;
}

* { box-sizing: border-box; }
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-pressed); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 56px); }
h2 { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 20px; }
h1 em, .hero h1 strong { font-style: italic; color: var(--accent); }
p { margin: 0; }

.wrap { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.wrap--text { width: min(680px, calc(100% - 32px)); }
.skip-link { position: fixed; top: 12px; inset-inline-start: 12px; z-index: 99; padding: 10px 14px; border-radius: 10px; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Header and footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { min-height: 56px; padding-block: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; text-decoration: none; }
.brand img { border-radius: 7px; }
.site-header__actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.theme-switch { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.theme-switch:hover { background: var(--accent-tint); }
.theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-switch svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch__moon, .store-badge__black { display: var(--light-only); }
.theme-switch__sun, .store-badge__white { display: var(--dark-only); }
/* theme.js runs the switch; without scripts it would do nothing. */
@media (scripting: none) { .theme-switch { display: none; } }

.site-footer { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.language-picker { position: relative; }
.language-picker summary { cursor: pointer; list-style: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-footer .language-picker nav { position: absolute; inset-inline-start: 0; bottom: calc(100% + 8px); min-width: 180px; width: max-content; max-width: calc(100vw - 32px); max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px var(--line); z-index: 1; }
.language-picker a { padding: 8px 12px; border-radius: 6px; }
.language-picker a:hover, .language-picker a:focus-visible, .language-picker a[aria-current] { background: var(--accent-tint); color: var(--ink); }

/* Store buttons */
.btn { display: inline-block; padding: 14px 24px; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--accent-pressed); color: var(--bg); }
.btn--sm { padding: 8px 16px; font-size: 15px; white-space: nowrap; }
.badge { display: inline-block; }
@media (max-width: 480px) { .site-header .btn--sm { display: none; } }
/* Apple's Download on the App Store badge, used as supplied: no recolouring, at least 40px tall.
   The black badge on the light theme, the white one on the dark. */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge img { width: auto; height: 54px; }

/* Home */
.hero { padding: 64px 0 32px; }
.hero__stack { display: grid; gap: 24px; justify-items: center; text-align: center; }
.hero h1 strong { display: block; }
.lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-soft); max-width: 30ch; }

/* The app intro's artwork (AppIntroHeroView), in units of its own width. */
.intro-art { position: relative; display: flow-root; container-type: inline-size; width: min(520px, 100%); aspect-ratio: 100 / 96; margin-block: 8px; text-align: center; }
.intro-art__clip { position: absolute; width: 35cqw; height: 26.25cqw; padding: .7cqw; border-radius: 2.2cqw; background: #FFF; box-shadow: 0 .8cqw 1.7cqw rgba(0, 0, 0, .16); transform: rotate(var(--tilt)); }
.intro-art__clip:nth-child(1) { inset-inline-start: 2cqw; top: 2.3cqw; --tilt: 4deg; }
.intro-art__clip:nth-child(2) { inset-inline-start: 0; top: 27.8cqw; --tilt: -2.86deg; }
.intro-art__clip:nth-child(3) { inset-inline-start: 1.2cqw; top: 53.3cqw; --tilt: 3.44deg; }
.intro-art__clip img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.7cqw; }
.intro-art__clip span { position: absolute; right: 2.3cqw; bottom: 2.3cqw; padding: .1em .4em; border-radius: .4em; background: rgba(0, 0, 0, .55); color: #FFF; font-size: 3cqw; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.intro-art__brief { position: relative; margin: 79.3cqw 0 0; width: 40cqw; padding: 2.2cqw; border-radius: 2.2cqw; background: var(--surface); color: var(--ink); font-family: var(--serif); font-style: italic; line-height: 1.3; border: var(--card-border); box-shadow: 0 .8cqw 1.7cqw rgba(0, 0, 0, .12); }
.intro-art__arrow { position: absolute; inset-inline-start: 37.1cqw; top: 37.4cqw; width: 11.4cqw; fill: none; stroke: var(--accent); stroke-width: 9.65; stroke-linecap: round; stroke-linejoin: round; }
.intro-art__result { position: absolute; inset-inline-start: 50cqw; top: 3.5cqw; width: 50cqw; height: 88.9cqw; padding: 1.1cqw; border-radius: 5cqw; background: #FFF; box-shadow: 0 2.4cqw 6cqw rgba(34, 32, 28, .14); }
.intro-art__result img { width: 100%; height: 100%; object-fit: cover; border-radius: 3.9cqw; }
.intro-art__caption { position: absolute; left: 7%; right: 7%; top: 68%; transform: translateY(-50%); color: #FFF; font-family: "TikTok Sans", var(--sans); font-size: 5.26cqw; font-weight: 900; line-height: 1.12; text-wrap: balance; -webkit-text-stroke: .18em #000; paint-order: stroke fill; text-shadow: 0 .06em .18em rgba(0, 0, 0, .45); }
.intro-art__caption span { color: #FFE64D; }
[dir="rtl"] .intro-art__clip { transform: rotate(calc(-1 * var(--tilt))); }
[dir="rtl"] .intro-art__arrow { transform: scaleX(-1); }

.steps { padding: 64px 0 24px; }
.steps h2 { margin-bottom: 32px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps__list li { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); counter-increment: step; }
.steps__list img { order: -1; align-self: center; width: min(240px, 100%); margin-bottom: 24px; border-radius: 30px; border: 6px solid var(--bg); box-shadow: 0 16px 40px rgba(34, 32, 28, .12); }
.steps__list li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.steps__list h3 { margin-bottom: 8px; }
.steps__list p { color: var(--muted); }

.promises { padding: 40px 0 0; }
.promises__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; color: var(--muted); }
.promises__list strong { display: block; margin-bottom: 4px; color: var(--ink); }

/* Text pages */
.page { padding: 48px 0 0; }
.page h1 { font-size: clamp(34px, 5vw, 44px); }
.page .updated { margin: 12px 0 32px; color: var(--muted); font-size: 15px; }
.page h2 { margin: 40px 0 12px; font-size: 26px; }
.page h3 { margin: 28px 0 8px; font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: 0; }
.page p, .page ul { margin: 0 0 14px; color: var(--ink-soft); }
.page ul { padding-inline-start: 22px; }
.page li { margin-bottom: 6px; }
.page h2[id], .page h3[id] { scroll-margin-top: 72px; }

@media (max-width: 760px) {
  .hero { padding-top: 40px; }
  .steps h2 { text-align: center; }
  .steps__list, .promises__list { grid-template-columns: 1fr; }
  .site-footer { margin-top: 64px; }
}

/* Locale expansion and script shaping: media retains its physical orientation. */
body { overflow-wrap: anywhere; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: normal; }
