/* ==========================================================================
   Doddle — product site. The OMO system (header, footer, buttons, icons, type,
   transitions, the shared product layout) from ooooomo.com/studio/omo.css, in
   Doddle's own white paper and ink, with the app icon's lime for Pro.
   Loaded after omo.css on doddle.ooooomo.com. Same page template as Pop Cafe
   and Rerun (DESIGN_SYSTEM.md §13). The films are the app's own screen
   recordings: whole screens sit in the phone shell, canvas crops get round
   corners over their recorded white ones.
   ========================================================================== */

.theme-doddle {
  --page: #ffffff;              /* Palette.ground */
  --page-2: #f0f0ec;            /* Palette.chip: the pricing band, document pages */
  --card: #ffffff;
  --ink-dd: #111111;            /* Palette.ink */
  --lime: #d9ff6b;              /* Palette.lime: the app icon, only for Pro */
  --lime-deep: #a6e83a;         /* Palette.limeDeep */
  --yellow: #ffe45c;            /* Palette.yellow */
  --bg: var(--page); --bg-2: var(--card); --fg: var(--ink-dd);
  --fg-mute: rgba(17, 17, 17, .58); --line: rgba(17, 17, 17, .1);
  --room: #9a9a9a; --lid: #111111; --dot: var(--lime-deep);
  --product-phone-max: 360px;   /* caps the shared stacked-layout phone width (omo.css) */
  background: var(--page);
  color: var(--fg);
}
.theme-doddle.is-doc { --page: #f0f0ec; }
html:has(body.theme-doddle) { scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html:has(body.theme-doddle) { scroll-behavior: smooth; } }
.theme-doddle ::selection { background: var(--lime); color: var(--ink-dd); }

/* The app icon, taken apart (doddle/Design: AppIcon-1024): a felt-black d on a lime field with
   riso grain, and a magenta four-petal flower stuck over its bottom-left. The site borrows the
   lime field (Pro), the grain (lime surfaces) and the flower (a sticker on the first phone, on the
   Pro card, on the 404), never more than one flower in view. */
.theme-doddle {
  --magenta: #eb187a;           /* the flower */
  --marigold: #ffbf55;          /* its centre */
  --lime-field: linear-gradient(170deg, #e2fd92 0%, #c7f568 48%, #a7e83b 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .2 0 0 0 0 0 0 0 0 -1.3 .78'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dd-flower { position: absolute; z-index: 3; display: block; height: auto; pointer-events: none; user-select: none; }
.dd-flower--hero { left: -11%; bottom: -2%; width: 28%; rotate: -8deg; }
.dd-flower--pro { right: -14px; top: -16px; width: clamp(64px, 6.4vw, 84px); rotate: 12deg; }
.dd-flower--lost { position: relative; width: clamp(88px, 10vw, 128px); margin: 0 auto 28px; }
/* The flower lands once the first phone is in: a sticker pressed on, not a loop. */
@media (prefers-reduced-motion: no-preference) {
  .dd-flower--hero { animation: dd-stick .7s var(--spring) .55s backwards; }
}
@keyframes dd-stick { from { opacity: 0; scale: 1.6; rotate: -30deg; } 60% { opacity: 1; } }

/* Header: ink on white, a white veil once you scroll. */
.theme-doddle .site-header { mix-blend-mode: normal; color: var(--ink-dd); }
.theme-doddle .site-header::before {
  content: ''; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--page) 45%, transparent);
  opacity: 0; transition: opacity .4s;
}
.is-scrolled .theme-doddle .site-header::before { opacity: 1; }
.theme-doddle .mobile-menu {
  --fg: #f1efe9; --fg-mute: rgba(241, 239, 233, .56);
  background: var(--ink-dd); color: var(--fg);
  justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain;
}
.theme-doddle .mobile-menu > nav { margin-top: auto; flex-shrink: 0; }
.theme-doddle .mobile-menu > nav a { font-size: clamp(28px, min(14vw, 7svh), 72px); }
.theme-doddle[data-page] .brand-link { opacity: 1; transform: none; pointer-events: auto; }
.header-get {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-right: 6px; padding: 0 16px 0 14px;
  border-radius: 999px; background: var(--ink-dd); color: #fff; font: 600 14px/1 var(--display);
  transition: transform .5s var(--spring), background-color .3s;
}
.header-get svg { width: 14px; height: 17px; }
.header-get:hover { transform: translateY(-1px); background: #333; }
.header-get:active { transform: scale(.96); }
@media (max-width: 860px) { .header-get, .theme-doddle .get-pop { display: none; } }

/* The wordmark: the app icon's Doddle (Design/doddle-appicon.svg), in ink. */
.dd-mark { display: block; width: 100%; height: auto; fill: currentColor; }
.theme-doddle .brand-link { display: flex; align-items: center; }
.brand-link .dd-mark { width: 84px; }

/* ---------------------------------------------------------------- shared bits */
.pc-display { font: 600 clamp(52px, 7.2vw, 120px)/0.9 var(--display); letter-spacing: -0.055em; text-wrap: balance; }
.pc-title { font: 600 clamp(38px, 4.8vw, 74px)/0.96 var(--display); letter-spacing: -0.045em; text-wrap: balance; }
.pc-lede { margin-top: 22px; max-width: 36ch; font: 400 clamp(17px, 1.35vw, 21px)/1.45 var(--text); color: var(--fg-mute); text-wrap: pretty; }
.pc-lede a, .pc-sub a:not(.arrow-link) { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.pc-fine { margin-top: 16px; font: 500 14px/1.3 var(--display); color: var(--fg-mute); }
.pc-sub { margin-top: 18px; color: var(--fg-mute); }
.pc-head { max-width: 900px; margin-bottom: clamp(32px, 4vw, 60px); }
.pc-head--center { margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.pc-section--tint { background: var(--page-2); }

/* The App Store badge before release: drawn, always in English (Apple allows no self-made
   translations). Once APP_STORE_URL is set, tools/build.py uses Apple's badge (kit/store.py). */
.dd-badge {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border-radius: 16px;
  background: #000; color: #fff; transition: transform .5s var(--spring);
}
.dd-badge svg { width: 21px; height: 25px; flex: none; }
.dd-badge span { display: grid; gap: 2px; text-align: left; }
.dd-badge small { font: 500 11px/1 var(--text); letter-spacing: .01em; opacity: .9; }
.dd-badge b { font: 600 21px/1 var(--display); letter-spacing: -0.02em; }
.dd-badge:hover { transform: translateY(-2px); }
.dd-badge:active { transform: scale(.97); }
.dd-badge.store-badge--large { height: 64px; border-radius: 18px; padding: 0 26px 0 22px; }
.dd-badge.store-badge--large b { font-size: 24px; }
/* Apple's own badge, once the listing is configured. */
.store-badge { display: inline-flex; height: 56px; transition: transform .5s var(--spring); }
.store-badge img { display: block; width: auto; height: 100%; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge--large { height: 64px; }

/* ---------------------------------------------------------------- the phone and the films
   A whole iPhone screen recording (780 × 1688) sits in the products' black shell, the same
   one Pop Cafe and Rerun use; its screen corners are the shell's. */
.dd-phone {
  position: relative; margin: 0; width: clamp(260px, min(26vw, (100svh - 140px) / 2.2), 360px); padding: 2.6%;
  border-radius: 15.5% / 7.3%;
  background: linear-gradient(150deg, #34323f, #121118 55%, #24222c);
  box-shadow: inset 0 0 0 1.5px #5e5b70, inset 0 0 0 4px #17161c, 0 60px 90px -50px rgba(20, 20, 30, .45), 0 24px 50px -34px rgba(20, 20, 30, .3);
}
.dd-screen {
  position: relative; display: block; aspect-ratio: 780 / 1688; border-radius: 13.4% / 6.2%; overflow: hidden;
  background: #fff; isolation: isolate; transform: translateZ(0);
}
.dd-film { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A film that couldn't start by itself (Low Power Mode, reduced motion) plays on a tap. */
[data-film].is-held { cursor: pointer; }

/* Hero: the phone fills the first screen's height, as on Rerun. */
.dd-hero-media { position: relative; justify-self: center; }
.dd-phone--hero { width: min(calc((100svh - var(--header-h) - clamp(40px, 7svh, 88px)) * 0.46), 44vw, 360px); }
.pc-hero-split .pc-display { font-size: clamp(46px, 5.1vw, 84px); line-height: .9; }
.pc-hero-split .pc-lede { max-width: 27ch; }

/* Made in Doddle: three canvas recordings in a row at the same height (each takes width in
   proportion to its shape). The recorded canvas has white corners; the radius per film covers
   them (they were cropped at different scales, so the corner is a different share of each). */
.dd-results {
  --gap: clamp(16px, 2vw, 32px);
  display: flex; align-items: flex-start; gap: var(--gap); margin: clamp(24px, 4vw, 72px) auto; padding: 0; list-style: none;
  max-width: min(100%, calc(70svh * 2.32 + 2 * var(--gap)));
}
.dd-result { flex: calc(var(--w) / var(--h)) 1 0%; min-width: 0; container-type: inline-size; }
.dd-canvas {
  position: relative; margin: 0; aspect-ratio: var(--w) / var(--h); overflow: hidden;
  border-radius: var(--r, 10cqw); background: #eee; isolation: isolate; transform: translateZ(0);
}
.dd-caption { margin-top: clamp(14px, 1.4vw, 22px); font: 600 clamp(19px, 1.7vw, 26px)/1.1 var(--display); letter-spacing: -0.025em; text-wrap: balance; }

/* ---------------------------------------------------------------- pricing: Free on white, Pro on the icon's lime */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: clamp(12px, 1.6vw, 20px); }
.plan { display: flex; flex-direction: column; padding: clamp(26px, 2.8vw, 38px); border-radius: 32px; background: var(--card); }
.plan h3 { font: 600 26px/1 var(--display); letter-spacing: -0.03em; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.plan-price b { font: 600 clamp(48px, 4.6vw, 64px)/1 var(--display); letter-spacing: -0.045em; }
.plan-price span { font: 500 16px/1 var(--display); color: var(--fg-mute); }
.plan-list { display: grid; gap: 12px; margin: 26px 0 32px; padding: 0; list-style: none; }
.plan-list li { position: relative; padding-left: 28px; line-height: 1.35; }
.plan-list li::before {
  content: ''; position: absolute; left: 0; top: .1em; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan-cta { display: grid; place-items: center; height: 54px; margin-top: auto; border-radius: 999px; background: var(--ink-dd); color: #fff; font: 600 16px/1 var(--display); transition: transform .5s var(--spring), background-color .3s; }
.plan-cta:hover { transform: translateY(-2px); background: #333; }
.plan-cta--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.plan-cta--ghost:hover { background: var(--page-2); }
.plan { position: relative; }
.plan--pro { background: var(--grain) 0 0 / 180px, var(--lime-field); }
.plan--pro .plan-price span { color: rgba(17, 17, 17, .64); }
.plans-fine { max-width: 60ch; margin: 28px auto 0; text-align: center; font-size: 14px; line-height: 1.45; color: var(--fg-mute); }

/* ---------------------------------------------------------------- FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(28px, 6vw, 110px); }
.faq-grid .pc-head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 2px; cursor: pointer; list-style: none;
  font: 600 clamp(18px, 1.5vw, 22px)/1.25 var(--display); letter-spacing: -0.015em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--page-2); transition: transform .5s var(--spring), background-color .3s; }
.faq-item summary i::before, .faq-item summary i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: currentColor; }
.faq-item summary i::after { rotate: 90deg; }
.faq-item[open] summary i { transform: rotate(45deg); background: var(--lime); }
.faq-item summary:hover i { background: #e6e6e1; }
.faq-a p { max-width: 62ch; padding: 0 2px 24px; line-height: 1.55; color: var(--fg-mute); }
.faq-a a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- get */
.pc-get { padding: clamp(40px, 6vw, 100px) 0 clamp(80px, 10vw, 150px); }
.pc-get-inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(32px, 5vw, 80px); }
.pc-get-icon { width: 104px; height: 104px; border-radius: 24px; }
.dd-get-mark { width: clamp(200px, 22vw, 300px); margin-top: 30px; color: var(--ink-dd); }
.pc-get .pc-lede { margin: 18px auto 30px; }

/* ---------------------------------------------------------------- footer (OMO contact pattern, Doddle navigation) */
.theme-doddle .site-footer {
  min-height: 0; display: block; background: var(--bg); color: var(--fg);
  padding: clamp(72px, 8vw, 120px) 0 0; border-top: 1px solid var(--line);
}
.theme-doddle.is-doc .site-footer { background: var(--page); }
.theme-doddle .footer-top { grid-template-columns: minmax(0, 1fr) minmax(384px, max-content); align-items: start; gap: clamp(32px, 4vw, 64px); }
.theme-doddle .footer-hello { min-width: 0; }
/* Columns are at least as wide as their longest link (German: “Nutzungsbedingungen”). */
.pop-foot-cols { display: grid; grid-template-columns: repeat(3, minmax(min-content, 1fr)); gap: 24px; }
.pop-foot-cols h2 { margin-bottom: 14px; font: 600 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-mute); }
.pop-foot-cols a { display: block; width: fit-content; padding: 6px 0; font: 500 16px/1.2 var(--display); white-space: nowrap; }
.theme-doddle .footer-base { margin-top: clamp(48px, 6vw, 88px); align-items: center; padding-top: 24px; }
.made-by { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-dd); }
.made-by svg { width: 64px; height: auto; }
@media (min-width: 1101px) {
  .theme-doddle .footer-hello .footer-mail { font-size: clamp(36px, 4.7vw, 80px); }
}

/* ---------------------------------------------------------------- documents */
.reading-layout {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 760px); gap: clamp(28px, 5vw, 80px);
  justify-content: center; align-items: start;
  padding: calc(var(--header-h) + clamp(32px, 6vw, 90px)) var(--gutter) clamp(80px, 10vw, 140px);
}
.chapter-rail { position: sticky; top: calc(var(--header-h) + 24px); }
.chapter-rail ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.chapter-rail a { display: block; padding: 7px 12px; border-radius: 999px; color: var(--ink-dd); transition: background-color .3s, opacity .3s; opacity: .55; }
.chapter-rail a span { font: 500 14px/1.2 var(--display); }
.chapter-rail a:hover, .chapter-rail a.is-current { opacity: 1; background: var(--card); }
.reading-paper { min-width: 0; padding: clamp(24px, 4.4vw, 68px); border-radius: var(--radius); background: var(--card); font-size: 17px; line-height: 1.62; }
.reading-paper .breadcrumb { display: flex; gap: 8px; margin-bottom: clamp(28px, 4vw, 52px); font: 500 14px/1 var(--display); opacity: .5; }
.reading-paper .breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.reading-paper .article-hero { margin-bottom: clamp(28px, 4vw, 52px); }
.reading-paper h1 { font: 600 clamp(44px, 6.4vw, 96px)/0.92 var(--display); letter-spacing: -0.05em; text-wrap: balance; }
.reading-paper .article-hero p { margin-top: 16px; font: 400 clamp(18px, 1.5vw, 22px)/1.4 var(--text); opacity: .7; }
.reading-paper section { margin-top: clamp(36px, 4.4vw, 56px); scroll-margin-top: calc(var(--header-h) + 20px); }
.reading-paper h2 { font: 600 clamp(24px, 2.4vw, 34px)/1.05 var(--display); letter-spacing: -0.03em; margin-bottom: 14px; text-wrap: balance; }
.reading-paper p, .reading-paper li, .reading-paper address { max-width: 66ch; }
.reading-paper p + p, .reading-paper ul + p { margin-top: 14px; }
.reading-paper a:not(.next-track):not(.license-list a) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.reading-paper ul { margin: 14px 0 0; }  /* bullets: omo.css */
.reading-paper li + li { margin-top: 8px; }
.reading-paper address { font-style: normal; }
.reading-paper .note-module { margin-top: 0; padding: clamp(20px, 2.4vw, 32px); border-radius: 22px; }
.reading-paper .note-module h2 { margin-bottom: 10px; }
.note-module-blue { background: #f0f0ec; }
.note-module-lime { background: var(--grain) 0 0 / 180px, var(--lime-field); }
.reading-paper .next-track {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: clamp(40px, 5vw, 64px);
  padding: clamp(20px, 2.4vw, 30px); border-radius: 22px; background: var(--ink-dd); color: #fff;
  font: 600 clamp(20px, 2vw, 28px)/1.1 var(--display); letter-spacing: -0.025em; transition: transform .6s var(--spring);
}
.reading-paper .next-track:hover { transform: translateY(-3px); }
.reading-paper .next-track b { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink-dd); font-weight: 500; }
.reading-paper .l10n-note { margin-bottom: clamp(20px, 3vw, 32px); font-size: 15px; color: var(--fg-mute); }
.license-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.reading-paper .license-list li { max-width: none; margin: 0; padding: 0; }
.reading-paper .license-list li::before { content: none; }
.license-list a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--page-2); transition: background-color .3s; }
.license-list a:hover { background: #e6e6e1; }
.license-list strong { font: 600 18px/1.2 var(--display); letter-spacing: -0.015em; }
.license-list span { font-size: 14px; line-height: 1.4; color: var(--fg-mute); }
.license-text { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--page-2); overflow-x: auto; white-space: pre-wrap; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg-mute); }

.not-found { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--header-h) var(--gutter); }
.not-found h1 { font: 600 clamp(44px, 7vw, 110px)/0.92 var(--display); letter-spacing: -0.05em; }
.not-found .arrow-link { margin-top: 32px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1100px) {
  .theme-doddle .footer-top { grid-template-columns: 1fr; }
}
/* Portrait screens: title, then the whole phone, then the sentence and the badge. The width is
   the shared product phone width (omo.css), which the feature phones below use too. */
@media (max-width: 860px), (orientation: portrait) and (max-width: 1180px) {
  .dd-hero-media { order: 2; margin-top: var(--product-hero-media-gap); }
  .dd-phone--hero, .dd-phone { width: var(--product-phone-w); }
}
@media (max-width: 860px) {
  .dd-results { flex-direction: column; align-items: center; gap: clamp(40px, 9vw, 64px); max-width: none; }
  .dd-result { flex: none; width: min(100%, calc(var(--product-phone-w) * 1.4)); text-align: center; }
  .dd-result:nth-child(2) { width: min(100%, var(--product-phone-w)); }
  .plans { grid-template-columns: minmax(0, 460px); }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .pc-head { position: static; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .chapter-rail { position: static; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .chapter-rail ol { display: flex; gap: 6px; width: max-content; }
  .chapter-rail a { background: var(--card); }
}
@media (max-width: 520px) {
  .pc-display { font-size: clamp(46px, 13.5vw, 64px); }
  .pop-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two narrow columns: a long label (Conditions d’utilisation) wraps instead of rolling. */
  .pop-foot-cols a { white-space: normal; }
  .pop-foot-cols .roll { height: auto; overflow: visible; line-height: 1.2; padding-bottom: 0; margin-bottom: 0; }
  .pop-foot-cols .roll > span { text-shadow: none; transform: none; }
}
