/* Foldcard website. Colors and fonts from the app's DesignSystem (FC.Palette, Baloo 2, Nunito). */
@font-face {
	font-family: "Baloo 2";
	src: url("/fonts/Baloo2-SemiBold.ttf") format("truetype");
	font-weight: 600;
	font-display: swap;
}
@font-face {
	font-family: "Nunito";
	src: url("/fonts/Nunito-Regular.ttf") format("truetype");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Nunito";
	src: url("/fonts/Nunito-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}

:root {
	--cloud: #f5f3ff;
	--surface: #ffffff;
	--ink: #1f1a47;
	--ink-soft: #4d4878;
	--violet: #6b4eff;
	--violet-deep: #4b32d9;
	--lavender: #e6e0ff;
	--hairline: #e1dcf7;
	--sun-soft: #fff1da;
	--mint: #d6f5ea;
	--mint-ink: #1e7a5a;
	--radius: 22px;
	--radius-small: 14px;
	--max: 1040px;
	--gutter: 20px;
	--header: 64px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--cloud);
	color: var(--ink);
	font: 400 17px/1.6 "Nunito", system-ui, sans-serif;
}

h1, h2, h3 {
	font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--violet-deep); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
img { max-width: 100%; height: auto; display: block; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }

.skip {
	position: absolute;
	left: -9999px;
}
.skip:focus {
	left: var(--gutter);
	top: 12px;
	background: var(--surface);
	padding: 8px 14px;
	border-radius: var(--radius-small);
	z-index: 10;
}

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.narrow { max-width: 760px; }

/* header: stays at the top, 64 px (--header), so the Duo story can stand right under it */
.site-header {
	position: sticky;
	top: 0;
	z-index: 5;
	background: rgba(245, 243, 255, 0.94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: var(--header);
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
	font-family: "Baloo 2", sans-serif;
	font-weight: 600;
	font-size: 1.4rem;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
	color: var(--ink-soft);
	text-decoration: none;
	font-weight: 700;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--violet-deep); }

.eyebrow {
	display: inline-block;
	background: var(--lavender);
	color: var(--violet-deep);
	font-weight: 700;
	font-size: 0.9rem;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 16px;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button {
	display: inline-block;
	background: var(--violet);
	color: #fff;
	text-decoration: none;
	font-family: "Baloo 2", sans-serif;
	font-weight: 600;
	font-size: 1.15rem;
	padding: 12px 26px;
	border-radius: 999px;
	box-shadow: 0 4px 0 var(--violet-deep);
}
.button:hover { color: #fff; background: var(--violet-deep); }
/* Apple's badge, unmodified (Marketing Tools); at least 40 px tall on screen */
.actions { align-items: center; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 50px; width: auto; }
.button.secondary {
	background: var(--surface);
	color: var(--violet-deep);
	box-shadow: 0 0 0 2px var(--violet-deep) inset;
}
.status { color: var(--ink-soft); font-weight: 700; margin-top: 18px; }
.phone {
	justify-self: center;
	width: min(320px, 80vw);
	border-radius: 44px;
	border: 10px solid var(--ink);
	background: var(--ink);
	overflow: hidden;
	box-shadow: 0 30px 60px -20px rgba(31, 26, 71, 0.35);
}
.phone img { border-radius: 34px; }

/* sections */
section { padding: 56px 0; }
section.alt { background: var(--surface); }
.section-intro { color: var(--ink-soft); max-width: 40em; margin-bottom: 28px; }

.every {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 40px;
	align-items: center;
}
.every .phone { width: min(260px, 70vw); }
.card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 24px;
	border: 1px solid var(--hairline);
}
section.alt .card { background: var(--cloud); border-color: transparent; }
.card .tag {
	display: inline-block;
	font-weight: 700;
	font-size: 0.85rem;
	padding: 2px 10px;
	border-radius: 999px;
	margin-bottom: 10px;
}
.tag.open { background: var(--lavender); color: var(--violet-deep); }
.tag.closed { background: var(--sun-soft); color: var(--ink); }
.tag.tabletop { background: var(--mint); color: var(--mint-ink); }
.card p:last-child { margin-bottom: 0; }

.features {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}
.features ul { margin: 0; }

.privacy-strip {
	background: var(--ink);
	color: #fff;
	border-radius: var(--radius);
	padding: 32px;
}
.privacy-strip h2 { color: #fff; }
.privacy-strip p { color: #e6e0ff; margin-bottom: 0; }
.privacy-strip a { color: #fff1da; }

/* legal and support pages */
.doc { padding: 32px 0 64px; }
.doc h2 { font-size: 1.5rem; margin-top: 1.6em; }
.doc h3 { margin-top: 1.2em; }
.doc code {
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: 0.9em;
}
.doc pre {
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-small);
	padding: 14px 18px;
	overflow-x: auto;
	line-height: 1.45;
}
.doc .license {
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-small);
	padding: 14px 18px;
	font-size: 0.85rem;
	line-height: 1.5;
}
.doc .license p { margin: 0 0 0.8em; }
.doc .license p:last-child { margin-bottom: 0; }
.meta { color: var(--ink-soft); font-weight: 700; }
.summary {
	background: var(--surface);
	border-left: 6px solid var(--violet);
	border-radius: var(--radius-small);
	padding: 18px 22px;
	margin: 20px 0 8px;
}
.summary p:last-child { margin-bottom: 0; }
.faq details {
	background: var(--surface);
	border-radius: var(--radius-small);
	padding: 14px 20px;
	margin-bottom: 10px;
	border: 1px solid var(--hairline);
}
.faq summary {
	cursor: pointer;
	font-weight: 700;
}
.faq details[open] summary { margin-bottom: 8px; }
.faq details p:last-child, .faq details ul:last-child { margin-bottom: 0; }
.contact {
	background: var(--lavender);
	border-radius: var(--radius);
	padding: 24px;
	margin: 24px 0;
}
.contact h2 { margin-top: 0; }
.contact p:last-child { margin-bottom: 0; }

/* press kit */
.facts {
	width: 100%;
	border-collapse: collapse;
	background: var(--surface);
	border-radius: var(--radius-small);
	overflow: hidden;
	margin: 12px 0 8px;
}
.facts th, .facts td {
	text-align: left;
	vertical-align: top;
	padding: 10px 16px;
	border-bottom: 1px solid var(--hairline);
}
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 32%; font-weight: 700; color: var(--ink-soft); }
.doc .copy-box pre.prose, .doc .copy-box pre.prose code { font-family: "Nunito", system-ui, sans-serif; font-size: 1rem; }
.press .copy-box + p { margin-top: -12px; }
.actions + .meta { margin-top: 12px; }
.press-shots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
	margin: 16px 0 8px;
}
.press-shots figure { margin: 0; }
.press-shots img { border-radius: var(--radius-small); border: 1px solid var(--hairline); }
.press-shots figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; }
@media (max-width: 480px) {
	.facts th, .facts td { display: block; width: auto; }
	.facts th { padding-bottom: 0; border-bottom: 0; }
}

/* "Make a deck with AI" on the product page */
.ai-band {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	background: var(--lavender);
	border-radius: var(--radius);
	padding: 32px;
}
.ai-band h2 { margin-bottom: 0.3em; }
.ai-band p { margin: 0; color: var(--ink-soft); max-width: 36em; }
.ai-band .button { white-space: nowrap; }

/* A text to copy (/ai/): a white, cloud-soft window with a title, a copy icon top right (copy.js shows it), and the
   text in a code panel inside. */
.copy-box {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: 0 1px 0 var(--hairline), 0 12px 32px rgba(75, 50, 217, 0.12);
	padding: 14px 14px 14px;
	margin: 14px 0 24px;
}
.copy-box-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 40px;
	padding: 0 2px 10px 8px;
}
.doc .copy-box-head h3, .copy-box-label {
	margin: 0;
	font: 600 1.1rem/1.2 "Baloo 2", "Nunito", system-ui, sans-serif;
	color: var(--ink);
}
.copy-icon {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: none;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lavender);
	color: var(--violet-deep);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}
.copy-icon[hidden] { display: none; }
.copy-icon svg {
	grid-area: 1 / 1;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.copy-icon .icon-done { visibility: hidden; }
.copy-icon:hover { background: var(--violet); color: #fff; }
.copy-icon:focus-visible { outline: 3px solid var(--violet-deep); outline-offset: 2px; }
.copy-icon.is-copied { background: var(--mint); color: var(--mint-ink); }
.copy-icon.is-copied .icon-copy { visibility: hidden; }
.copy-icon.is-copied .icon-done { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .copy-icon { transition: none; } }
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
/* Wrapped, so the whole prompt reads on a phone; the copied text keeps its own line breaks. */
.doc .copy-box pre {
	margin: 0;
	background: var(--cloud);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-small);
	padding: 14px 16px;
	color: var(--ink);
	font-size: 0.92rem;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.doc .copy-box pre code { font-size: 1em; }

/* /ai/: numbered steps for someone who has never opened Terminal, and the collapsed details. */
.big-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 24px; }
.big-steps li {
	counter-increment: step;
	position: relative;
	padding: 4px 0 18px 52px;
	font-size: 1.1rem;
}
.big-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--lavender);
	color: var(--violet-deep);
	font: 600 1.15rem/36px "Baloo 2", sans-serif;
	text-align: center;
}
.big-steps li p { margin: 10px 0 0; }
button.copy-button { border: 0; cursor: pointer; }
button.copy-button[hidden] { display: none; }
button.copy-button.secondary { border: 0; }
.doc details.more {
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-small);
	padding: 12px 18px;
	margin: 0 0 12px;
}
.doc details.more summary { cursor: pointer; font-weight: 700; }
.doc details.more[open] summary { margin-bottom: 10px; }
.doc details.more > :last-child { margin-bottom: 0; }

/* footer */
.site-footer {
	border-top: 1px solid var(--hairline);
	padding: 28px 0 40px;
	color: var(--ink-soft);
	font-size: 0.92rem;
}
.site-footer p { margin: 0 0 0.4em; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.site-footer nav a { font-weight: 700; }
.site-footer .credit { font-size: 0.85rem; }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the Duo story (duo.js)
   The phone is laid out at its real size in points (inner display 952 × 669, each half 476 × 669) and only ever
   scaled down (--s), so Safari never rasterises it blurry. duo.js sets the variables from the scroll position.
   No overflow, opacity or filter on any preserve-3d ancestor: each would flatten the 3D. */
.duo-story { position: relative; }
.duo-sticky {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--gutter) 24px;
	display: grid;
	grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
	gap: 24px;
	align-items: center;
}
.duo-copy h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.duo-copy h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.duo-copy .tag {
	display: inline-block;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 3px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}
.duo-step + .duo-step { margin-top: 40px; }

.duo-stage {
	--s: 0.5;
	--cover: 0deg;
	--body: 0deg;
	--rot: 0deg;
	--tilt: 0deg;
	--shift: 0px;
	--tt: 0;
	--floor-w: 900px;
	position: relative;
	height: 70vh;
	min-height: 360px;
	perspective: 2400px;
	perspective-origin: 50% 30%;
}
.duo-floor {
	position: absolute;
	left: 50%;
	top: 50%;
	width: calc(var(--floor-w) * var(--s));
	height: calc(90px * var(--s));
	transform: translate(-50%, calc(360px * var(--s)));
	background: radial-gradient(closest-side, rgba(31, 26, 71, 0.22), rgba(31, 26, 71, 0));
	filter: blur(4px);
}
.duo-scale {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 952px;
	height: 669px;
	margin: -334.5px 0 0 -476px;
	transform: scale3d(var(--s), var(--s), var(--s));
	transform-style: preserve-3d;
}
.duo-device {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transform: translateX(var(--shift)) rotateX(var(--tilt)) rotateZ(var(--rot));
}
.duo-half {
	position: absolute;
	top: 0;
	width: 476px;
	height: 669px;
	transform-style: preserve-3d;
}
.duo-cover {
	left: 0;
	transform-origin: 100% 50%;
	transform: translateZ(1.5px) rotateY(var(--cover));
}
.duo-body {
	left: 476px;
	transform-origin: 0 50%;
	transform: rotateY(var(--body));
}
.duo-face {
	position: absolute;
	inset: 0;
	background: #16131f;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.duo-cover-front { border-radius: 40px 0 0 40px; }
.duo-body-front { border-radius: 0 40px 40px 0; box-shadow: 0 30px 60px -30px rgba(31, 26, 71, 0.45); }
.duo-cover-back { transform: rotateY(180deg); border-radius: 16px 46px 46px 16px; }
.duo-screen {
	position: absolute;
	overflow: hidden;
	background: var(--cloud);
}
.duo-cover-front .duo-screen { inset: 12px 0 12px 12px; border-radius: 30px 0 0 30px; }
.duo-body-front .duo-screen { inset: 12px 12px 12px 0; border-radius: 0 30px 30px 0; }
.duo-cover-back .duo-screen { inset: 11px 12px 11px 15px; border-radius: 8px 36px 36px 8px; }
.duo-open {
	position: absolute;
	inset: 0;
	background: url("/img/duo-open.jpg") no-repeat;
	background-size: 200% 100%;
}
.duo-cover .duo-open { background-position: 0 0; }
.duo-body .duo-open { background-position: 100% 0; }
/* the tabletop screenshot, turned back by 90° so it stands upright once the phone has turned */
.duo-tt {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 645px;
	height: 464px;
	transform: translate(-50%, -50%) rotate(-90deg);
	background: url("/img/duo-tabletop.jpg") no-repeat;
	background-size: 100% 200%;
	opacity: var(--tt);
}
.duo-cover .duo-tt { background-position: 0 0; }
.duo-body .duo-tt { background-position: 0 100%; }
.duo-crease {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 22px;
}
.duo-cover .duo-crease { right: 0; background: linear-gradient(to left, rgba(31, 26, 71, 0.12), rgba(31, 26, 71, 0)); }
.duo-body .duo-crease { left: 0; background: linear-gradient(to right, rgba(31, 26, 71, 0.12), rgba(31, 26, 71, 0)); }
.duo-outer {
	position: absolute;
	inset: 0;
	background: url("/img/duo-closed.jpg") center / cover no-repeat;
}
.duo-camera {
	position: absolute;
	top: 30px;
	right: 34px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #000;
}
.duo-progress { display: none; }

/* With JS: the stage stays put while the story scrolls by; one step shows at a time. */
.js .duo-story { height: 330vh; height: 330svh; }
.js .duo-sticky {
	position: sticky;
	top: var(--header);
	height: calc(100vh - var(--header));
	height: calc(100svh - var(--header));
	padding-bottom: 0;
}
.js .duo-stage { height: 100%; min-height: 0; }
.js .duo-copy { position: relative; height: 70%; }
.js .duo-step {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(calc(-50% + 16px));
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.js .duo-step.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%);
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s;
}
.js .duo-progress {
	display: flex;
	gap: 8px;
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
}
.duo-progress span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hairline);
	transition: background 0.3s, width 0.3s;
}
.duo-progress span.is-active { background: var(--violet); width: 22px; border-radius: 4px; }

/* One column (the closed Duo, the open Duo held upright, any iPhone): the phone on top, the step below it. */
@media (max-width: 760px) {
	.duo-sticky { grid-template-columns: 1fr; }
	.duo-stage { order: -1; height: 52vh; }
	.js .duo-sticky { grid-template-rows: 55% 45%; align-items: stretch; gap: 0; }
	.js .duo-copy { height: 100%; }
	.js .duo-step { top: 8px; transform: translateY(16px); }
	.js .duo-step.is-active { transform: none; }
	.duo-copy h1 { font-size: 2rem; }
	.duo-copy h2 { font-size: 1.5rem; }
	.duo-copy .lead { font-size: 1.02rem; }
	.duo-copy .eyebrow, .duo-copy .tag { margin-bottom: 8px; }
	.js .duo-progress { bottom: 10px; }
}
/* Short landscape screens (the open Duo held sideways): tighter type so a step fits beside the phone. */
@media (min-width: 761px) and (max-height: 720px) {
	.duo-copy h1 { font-size: 2.3rem; }
	.duo-copy h2 { font-size: 1.7rem; }
	.duo-copy .lead { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
	.js .duo-step, .js .duo-step.is-active, .duo-progress span { transition: none; }
}

@media (max-width: 820px) {
	.every, .features, .ai-band { grid-template-columns: 1fr; }
	section { padding: 40px 0; }
	.privacy-strip, .ai-band { padding: 24px; }
	.ai-band .button { justify-self: start; }
}
@media (max-width: 480px) {
	:root { --gutter: 16px; }
	body { font-size: 16px; }
	.site-nav { gap: 14px; }
}
/* Privacy stays in the footer; the header keeps one line on the narrowest phones. */
@media (max-width: 400px) {
	.site-nav .nav-extra { display: none; }
	.site-nav { gap: 12px; flex-wrap: nowrap; white-space: nowrap; }
	.brand { font-size: 1.2rem; gap: 8px; }
	.brand img { width: 32px; height: 32px; }
}
