/*
 * Ding Dong — the home page.
 *
 * The policy pages share style.css, which is built for long reading. This is
 * the one page built to be looked at first, so it has its own sheet rather
 * than bending that one. It speaks the app's language: the cream ground, the
 * black-weight DING DONG wordmark beside a blue bell, the short blue rule under
 * a headline, and the blue and red cards of the app's first screen
 * (StartingPageView). The same colours, from HexColor.swift.
 *
 * No scripts, no web fonts, no images beyond the app icon. The phone in the
 * hero is drawn in CSS, so it loads on a bad connection and never shows a
 * picture of somebody's real chat.
 */

:root {
	--back: #FFFDF7;
	--ink: #0B1A26;
	--blue: #0075C2;
	--blue-deep: #00437A;
	--blue-soft: #EDF5FB;
	--blue-line: #D8E7F3;
	--red: #FF3131;
	--white: #FFFFFF;
	--muted: #5A6772;
	--online: #26A96C;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--back);
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

a {
	color: var(--blue);
}

.wrap {
	max-width: 68rem;
	margin: 0 auto;
	padding-inline: 24px;
}

/* ---- the header, as the app draws it ---- */

.masthead {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-block: 22px;
}

.wordmark {
	font-size: 30px;
	font-weight: 900;
	letter-spacing: -1.2px;
	color: var(--ink);
	text-decoration: none;
	line-height: 1;
}

.masthead nav {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 22px;
}

.masthead nav a {
	color: var(--ink);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
}

.masthead nav a:hover {
	color: var(--blue);
}

.bell {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.bell svg {
	width: 17px;
	height: 17px;
	fill: var(--white);
}

/* ---- type ---- */

.eyebrow {
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
}

h1, h2, h3 {
	font-weight: 900;
	letter-spacing: -0.03em;
	margin: 0;
}

h1 {
	font-size: clamp(44px, 7vw, 76px);
	line-height: 1.0;
}

h2 {
	font-size: clamp(32px, 4.6vw, 48px);
	line-height: 1.05;
}

h3 {
	font-size: 21px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.rule {
	width: 48px;
	height: 4px;
	border-radius: 2px;
	background: var(--blue);
	margin: 22px 0;
}

.lede {
	font-size: 19px;
	color: var(--muted);
	max-width: 34rem;
	margin: 0;
}

/* ---- the hero ---- */

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 40px;
	align-items: center;
	padding-block: 48px 88px;
}

.cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

/* The app's account buttons: an eyebrow over a title, an arrow on the right. */
.card-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-width: 14rem;
	padding: 18px 20px;
	border-radius: 22px;
	color: var(--white);
	text-decoration: none;
}

.card-button small {
	display: block;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	opacity: 0.85;
}

.card-button strong {
	display: block;
	font-size: 19px;
	font-weight: 900;
	letter-spacing: -0.01em;
}

.card-button .arrow {
	font-size: 22px;
	font-weight: 900;
}

.card-button.blue { background: var(--blue); }
.card-button.red { background: var(--red); }

a.card-button:hover { filter: brightness(1.06); }

.fine {
	margin: 14px 0 0;
	font-size: 14px;
	color: var(--muted);
}

/* ---- the phone, drawn ---- */

.stage {
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.phone {
	width: 300px;
	border-radius: 46px;
	background: var(--ink);
	padding: 12px;
	box-shadow: 0 30px 60px -20px rgba(11, 26, 38, 0.35);
}

.screen {
	border-radius: 36px;
	background: var(--back);
	overflow: hidden;
	min-height: 540px;
	display: flex;
	flex-direction: column;
}

.chat-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 34px 16px 12px;
	border-bottom: 1px solid var(--blue-line);
	background: var(--white);
}

.avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--blue-soft);
	color: var(--blue-deep);
	font-weight: 900;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex: none;
}

.avatar::after {
	content: "";
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--online);
	border: 2px solid var(--white);
}

.chat-head b {
	display: block;
	font-size: 15px;
	font-weight: 900;
}

.chat-head span {
	display: block;
	font-size: 12px;
	color: var(--muted);
}

.messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 14px 20px;
}

.bubble {
	max-width: 78%;
	padding: 9px 13px;
	border-radius: 18px;
	font-size: 14px;
	line-height: 1.35;
}

.bubble.theirs {
	align-self: flex-start;
	background: var(--white);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.bubble.mine {
	align-self: flex-end;
	background: var(--blue);
	color: var(--white);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.status {
	align-self: flex-end;
	font-size: 11px;
	color: var(--muted);
	margin-top: -4px;
}

/* The line the server writes when somebody tries. */
.system-line {
	align-self: center;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
	padding: 6px 12px;
	margin: 6px 0;
	border-radius: 999px;
	background: var(--blue-soft);
}

.system-line::before {
	content: "📸 ";
}

/* What their screenshot shows: the chat's shield, small, tilted, leaning on
   the phone's edge -- over the bezel, never over a message. */
.capture {
	position: relative;
	flex: none;
	margin: 0 0 -28px -12px;
	width: 150px;
	transform: rotate(6deg);
	border-radius: 20px;
	background: var(--white);
	padding: 7px;
	box-shadow: 0 18px 36px -12px rgba(11, 26, 38, 0.4);
}

.capture-screen {
	border-radius: 14px;
	background: linear-gradient(#DCEBF6, #EAF3FA 55%, #F7FBFE);
	height: 220px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
	padding: 10px;
}

.capture-card {
	background: var(--white);
	border-radius: 12px;
	padding: 10px 8px;
	box-shadow: 0 4px 10px rgba(11, 26, 38, 0.08);
}

.capture-card b {
	display: block;
	font-size: 12px;
	font-weight: 900;
}

.capture-card span {
	display: block;
	font-size: 10px;
	color: #3F586B;
	margin-top: 2px;
}

.capture-mark {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: -0.3px;
	color: #005F9E;
}

.capture-label {
	display: block;
	text-align: center;
	font-size: 11px;
	font-weight: 800;
	color: var(--muted);
	margin-top: 6px;
}

/* ---- sections ---- */

section {
	padding: 88px 0;
}

section.tinted {
	background: var(--blue-soft);
	border-top: 1px solid var(--blue-line);
	border-bottom: 1px solid var(--blue-line);
}

.section-head {
	max-width: 44rem;
	margin-bottom: 44px;
}

.features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.feature {
	background: var(--white);
	border: 1px solid var(--blue-line);
	border-radius: 22px;
	padding: 24px;
}

.feature .icon {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	background: var(--blue-soft);
	margin-bottom: 16px;
}

.feature.loud {
	background: var(--blue);
	border-color: var(--blue);
	color: var(--white);
}

.feature.loud .icon {
	background: rgba(255, 255, 255, 0.18);
}

.feature.loud p {
	color: rgba(255, 255, 255, 0.88);
}

.feature p {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 16px;
}

/* ---- for parents ---- */

.promises {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.promise {
	display: flex;
	gap: 16px;
	background: var(--white);
	border: 1px solid var(--blue-line);
	border-radius: 22px;
	padding: 22px 24px;
}

.promise .tick {
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--blue);
	color: var(--white);
	font-weight: 900;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.promise p {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 16px;
}

/* ---- questions ---- */

.faq {
	max-width: 46rem;
	margin-top: 56px;
}

.faq h3 {
	margin-bottom: 14px;
}

details {
	border-bottom: 1px solid var(--blue-line);
}

summary {
	cursor: pointer;
	list-style: none;
	padding: 18px 36px 18px 0;
	font-weight: 800;
	font-size: 17px;
	position: relative;
}

summary::-webkit-details-marker {
	display: none;
}

summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 14px;
	font-size: 24px;
	font-weight: 700;
	color: var(--blue);
}

details[open] summary::after {
	content: "–";
}

details p {
	margin: 0 0 18px;
	color: var(--muted);
}

/* ---- the founder's spot ---- */

.made {
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: 46rem;
}

.made img {
	width: 84px;
	height: 84px;
	border-radius: 20px;
	flex: none;
	box-shadow: 0 8px 20px -8px rgba(11, 26, 38, 0.3);
}

.made p {
	margin: 8px 0 0;
	color: var(--muted);
}

/* ---- the last word ---- */

.closing {
	text-align: center;
}

.closing .rule {
	margin: 22px auto;
}

.closing .lede {
	margin: 0 auto;
}

.closing .cta {
	justify-content: center;
}

.closing .card-button {
	text-align: left;
}

/* ---- footer ---- */

footer {
	border-top: 1px solid var(--blue-line);
	padding: 28px 0 44px;
	font-size: 15px;
	color: var(--muted);
}

footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: center;
}

footer a {
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

footer a:hover {
	color: var(--blue);
}

footer .copy {
	margin-left: auto;
}

/* ---- narrower screens ---- */

@media (max-width: 60rem) {
	.hero {
		grid-template-columns: 1fr;
		gap: 64px;
		padding-top: 24px;
	}

	.features {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 40rem) {
	body { font-size: 16px; }
	.wrap { padding-inline: 16px; }
	.wordmark { font-size: 26px; }
	.masthead nav { gap: 14px; }
	.masthead nav a.optional { display: none; }
	.lede { font-size: 17px; }
	section { padding: 64px 0; }
	.features, .promises { grid-template-columns: 1fr; }
	.card-button { min-width: 0; width: 100%; }
	.hero { padding-top: 32px; }
	.phone { width: 236px; border-radius: 40px; padding: 10px; }
	.screen { min-height: 460px; border-radius: 31px; }
	.bubble { font-size: 13px; }
	.capture { width: 116px; margin: 0 0 -20px -10px; }
	.capture-screen { height: 176px; }
	.made { align-items: flex-start; }
	footer .copy { margin-left: 0; width: 100%; }
}

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