/*
  sōon iOS visual language. Values to edit when the app changes.

  Accent:     AccentColor asset
  Radii:      16 compact controls, 24 cards.
  Breathing:  Pause palettes. Three families; light/dark variants exist
  Type:       system TextStyles; rounded for timer digits and Pause

  The app is the source of truth. This file is a mirror.
*/

:root,
[data-theme="dark"] {
	color-scheme: dark;
	--bg: #000000;
	--bg-grouped: #1c1c1e;
	--ink: #f5f5f7;
	--ink-secondary: rgba(235, 235, 245, 0.6);
	--ink-tertiary: rgba(235, 235, 245, 0.3);
	--hairline: rgba(255, 255, 255, 0.12);
	--glass: rgba(255, 255, 255, 0.08);
	--glass-stroke: rgba(255, 255, 255, 0.22);
	--shadow: rgba(0, 0, 0, 0.45);
	--switch-track: rgba(120, 120, 128, 0.32);
	--accent: #ff2d55;
	--sky: #80ccfa;
	--sea: #4cd1c7;
	--depth: #9e9ef2;
}

[data-theme="light"] {
	color-scheme: light;
	--bg: #f2f2f7;
	--bg-grouped: #ffffff;
	--ink: #000000;
	--ink-secondary: rgba(60, 60, 67, 0.6);
	--ink-tertiary: rgba(60, 60, 67, 0.3);
	--hairline: rgba(60, 60, 67, 0.12);
	--glass: rgba(255, 255, 255, 0.62);
	--glass-stroke: rgba(0, 0, 0, 0.12);
	--shadow: rgba(0, 0, 0, 0.12);
	--switch-track: rgba(120, 120, 128, 0.16);
	--accent: #ff2d55;
	--sky: #639fe6;
	--sea: #29b5ab;
	--depth: #8282d1;
}

@supports (color: color(display-p3 1 0 0)) {
	:root,
	[data-theme="dark"],
	[data-theme="light"] {
		--accent: color(display-p3 1 0.176 0.333);
	}
}

:root {
	--font: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	--font-rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", var(--font);
	--radius-16: 16px;
	--radius-24: 24px;
	--radius-pill: 999px;
	--space: 8px;
	--measure: 36rem;
	--phone: 22.5rem;
}

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

html {
	background: var(--bg);
}

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

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

a:hover {
	text-decoration: underline;
}

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

.wrap {
	width: min(var(--measure), calc(100% - 2.5rem));
	margin-inline: auto;
	padding-block: 3rem 5rem;
}

header.hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 3.5rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.mark {
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 11px;
	display: block;
	object-fit: cover;
}

.wordmark {
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.lede {
	margin: 0.15rem 0 0;
	color: var(--ink-secondary);
	font-size: 0.94rem;
}

.theme-toggle {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--hairline);
	border-radius: var(--radius-pill);
	background: var(--bg-grouped);
	color: var(--ink);
	font: inherit;
	font-size: 0.8125rem;
	line-height: 1;
	cursor: pointer;
}

.theme-toggle-track {
	display: inline-block;
	width: 1.75rem;
	height: 1rem;
	border-radius: var(--radius-pill);
	background: var(--hairline);
	position: relative;
	flex: none;
}

.theme-toggle-thumb {
	position: absolute;
	top: 0.125rem;
	left: 0.125rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: var(--ink);
}

.theme-toggle[aria-checked="true"] .theme-toggle-thumb {
	left: auto;
	right: 0.125rem;
}

.kicker {
	margin: 0 0 0.35rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--ink-secondary);
	letter-spacing: 0.02em;
}

h1 {
	margin: 0 0 0.6rem;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.intro,
.note,
.donts p {
	margin: 0 0 1rem;
	color: var(--ink-secondary);
}

.intro {
	max-width: 32rem;
}

section {
	margin-top: 3.25rem;
}

h2 {
	margin: 0 0 0.65rem;
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

h3 {
	margin: 1.5rem 0 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ink-secondary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 1.75rem;
	margin: 1.25rem 0;
}

.swatch {
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.chip {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	flex: none;
}

.chip.accent { background: var(--accent); }
.chip.sky { background: var(--sky); }
.chip.sea { background: var(--sea); }
.chip.depth { background: var(--depth); }

.swatch b {
	display: block;
	font-weight: 600;
	font-size: 0.94rem;
}

.swatch span {
	display: block;
	font-size: 0.8rem;
	color: var(--ink-secondary);
}

.type-row {
	display: grid;
	gap: 1rem;
	margin: 1.25rem 0;
}

.type-row p {
	margin: 0;
}

.type-title {
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.type-body {
	font-size: 1.0625rem;
}

.type-caption {
	font-size: 0.75rem;
	color: var(--ink-secondary);
}

.type-numeral {
	font-family: var(--font-rounded);
	font-size: 3rem;
	font-weight: 700;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.glyphs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.94rem;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	color: var(--ink);
}

.note .sym {
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: 0.9em;
	color: var(--ink);
}

.shapes {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem;
	margin: 1.25rem 0;
}

.shape {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.75rem;
	color: var(--ink-secondary);
}

.shape i {
	display: block;
	background: var(--bg-grouped);
	border: 1px solid var(--hairline);
}

.shape .r16 {
	width: 4.5rem;
	height: 3rem;
	border-radius: var(--radius-16);
}

.shape .r24 {
	width: 5.5rem;
	height: 3.5rem;
	border-radius: var(--radius-24);
}

.shape .capsule {
	width: 5.5rem;
	height: 2rem;
	border-radius: var(--radius-pill);
}

.pill {
	width: 36px;
	height: 4px;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--ink) 20%, transparent);
	margin: 0.35rem 0 1rem;
}

.phone {
	width: min(var(--phone), 100%);
	margin: 1.25rem 0 0;
	padding: 0.65rem 0;
	background: var(--bg-grouped);
	border-radius: var(--radius-24);
	box-shadow: 0 10px 28px var(--shadow);
	overflow: hidden;
}

.row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.15rem;
	min-height: 44px;
}

.row + .row {
	border-top: 1px solid var(--hairline);
}

.row-title {
	flex: 1;
	font-weight: 400;
}

.preview {
	font-size: 0.94rem;
	color: var(--ink-secondary);
}

.bpm {
	font-size: 0.94rem;
	font-variant-numeric: tabular-nums;
	padding: 0.35rem 0.65rem;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--ink-secondary) 22%, transparent);
}

.glass {
	margin: 1.25rem 0 0;
	padding: 1.25rem 1.5rem 1.4rem;
	border-radius: var(--radius-24);
	background: var(--glass);
	border: 1px solid var(--glass-stroke);
	box-shadow: 0 10px 24px var(--shadow);
	backdrop-filter: blur(24px) saturate(1.4);
	-webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.glass .caption {
	margin: 0;
	font-size: 0.75rem;
	color: var(--ink-secondary);
	text-align: center;
}

.glass .type-numeral {
	text-align: center;
	margin: 0.35rem 0 0;
}

.sheet {
	margin: 1.25rem 0 0;
	padding: 0.75rem 1.25rem 1.35rem;
	background: var(--bg-grouped);
	border-radius: var(--radius-24) var(--radius-24) 0 0;
}

.sheet .pill {
	margin-inline: auto;
}

.sheet-title {
	margin: 0.15rem 0 0;
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1.25rem 0;
	padding: 0.85rem 1.15rem;
	background: var(--bg-grouped);
	border-radius: var(--radius-24);
}

.switch {
	width: 51px;
	height: 31px;
	border-radius: var(--radius-pill);
	background: var(--accent);
	position: relative;
	flex: none;
}

.switch::after {
	content: "";
	position: absolute;
	top: 2px;
	right: 2px;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.donts ul {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.donts li {
	padding: 0.55rem 0;
	border-top: 1px solid var(--hairline);
	color: var(--ink-secondary);
	list-style-type: "» ";
}

.donts li:last-child {
	border-bottom: none;
}

footer {
	margin-top: 3.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hairline);
	font-size: 0.8rem;
	color: var(--ink-secondary);
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
@media (max-width: 600px) {
	div.swatches .swatch:first-child {
		width: 100%
	}
}
