/*
 * Quick Apps site, in the Quick design system (docs/design-system.md), from the Quick Mail landing page's
 * stylesheet: white pages, ink-navy type and pill buttons, the warm wash in the hero, the violet stage for
 * brand moments. Inter (bundled, OFL) as the face. No inline styles or scripts: the CSP is strict.
 */
@font-face { font-family: "Inter Variable"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff;
  --panel: #f9f9fb;
  --card: #ffffff;
  --bg-hover: #f3f3f7;
  --accent-subtle: #e8e6ff;
  --text-strong: #161d26;
  --text: #232b37;
  --muted: #59636f;
  --border: #dedee3;
  --border-strong: #ccccd1;
  --control-border: #8c8c94;
  --ink: #161d26;
  --ink-hover: #232b37;
  --on-ink: #ffffff;
  --link: #0062d1;
  --accent: #8811c2;
  --aim: #a7059c;
  --ok: #037f0c;
  --warn: #855900;
  --danger: #d91515;
  --info: #0067c7;
  --ok-subtle: #e7f4e8;
  --warn-subtle: #fff4d6;
  --aim-subtle: #fbe6f8;
  --focus: #0062d1;
  --footer: #0f141a;
  --footer-text: #a4a4ad;
  --footer-line: #2c3440;

  --grad-brand: linear-gradient(135deg, #6b2fd6 0%, #8811c2 55%, #b50193 100%);
  --grad-warm: radial-gradient(100% 140% at 60% -10%, rgba(255, 255, 255, 0) 0%, #fff 75%), linear-gradient(96deg, #ffccf8 0%, #ffc0ad 26.85%, #ffd78a 59.66%, #fef571 100%);
  --grad-warm-band: linear-gradient(96deg, #ffc0ad 26.85%, #ffd78a 71.64%);
  --grad-violet: linear-gradient(100deg, #cbbaf9 0%, #f7ebf4 50%, #e39bde 100%);

  --font: "Inter Variable", system-ui, sans-serif;
  --mono: ui-monospace, monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
  /* The page's menu and floating-card shadow. */
  --shadow-menu: 1px 1px 20px rgba(0, 0, 0, .10);
  --gutter: clamp(24px, 8.3vw, 120px);
  --header-h: 76px;
  --section: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/24px var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
svg { flex: none; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
main:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 96px); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--text-strong); font-weight: 500; letter-spacing: normal; }
h2 { font-size: 32px; line-height: 40px; }
code { font-family: var(--mono); font-size: .875em; color: var(--text-strong); background: var(--bg-hover); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { font: 400 14px/24px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-strong); margin-bottom: 12px; }
.section { margin-top: var(--section); }
.section-lede { margin-top: 16px; font-size: 20px; line-height: 28px; max-width: 720px; }

/* Skip link: first in the page, visible on focus. */
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 20px; border-radius: 40px; background: var(--ink); color: var(--on-ink); text-decoration: none; transition: top 150ms var(--ease); }
.skip-link:focus { top: 8px; }

/* Links */
.link, .text-link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { text-decoration-thickness: 2px; }
.text-link { display: inline-block; padding: 10px 0; color: var(--text); font-size: 14px; line-height: 20px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 26px; border-radius: 40px; border: 0; font: 400 16px/24px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease), transform 75ms var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { background: var(--bg); color: var(--ink); border: 2px solid var(--ink); padding: 8px 24px; }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #dedee3; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 40px; font: 500 12px/18px var(--font); white-space: nowrap; background: var(--bg-hover); color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 150ms var(--ease); }
.is-scrolled .site-header { border-bottom-color: var(--border-strong); }
.bar { display: flex; align-items: center; gap: 48px; min-height: var(--header-h); width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; }
.wordmark { font: 500 18px/24px var(--font); color: var(--text-strong); white-space: nowrap; }
.site-menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { position: relative; font-size: 14px; line-height: 20px; color: var(--text); text-decoration: none; padding: 8px 0; white-space: nowrap; }
.site-nav a:hover { color: var(--text-strong); }
/* The section being read: a 2 px ink bar under the link (aria-current, set by site.js). */
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform 200ms var(--ease); }
.site-nav a:hover::after { transform: scaleX(1); opacity: .35; }
.site-nav a[aria-current] { color: var(--text-strong); font-weight: 500; }
.site-nav a[aria-current]::after { transform: scaleX(1); opacity: 1; }
.bar-actions { display: flex; align-items: center; gap: 32px; }
.menu-button { display: none; }

/* Hero */

.hero { position: relative; isolation: isolate; margin-top: -80px; padding: 152px 0 64px; }
/* The wash on its own layer, masked out towards the bottom so the hero meets the white page without a seam. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad-warm); -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent 94%); mask-image: linear-gradient(180deg, #000 65%, transparent 94%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 482px); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 3.6vw, 2.5rem); line-height: 1.1; max-width: 520px; }
.lede { margin-top: 16px; font-size: 20px; line-height: 28px; color: var(--text); max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.hero-note { margin-top: 24px; font-size: 14px; line-height: 20px; color: var(--muted); }
.arrow { display: inline-block; transition: transform 150ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* The suite on the violet stage: the four marks, decorative (the app grid below names and links them). */
.hero-media { display: grid; }
.suite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 32px; border-radius: 16px; background: var(--grad-violet); }
.suite-tile { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-strong); box-shadow: var(--shadow-menu); font-size: 16px; line-height: 24px; font-weight: 500; color: var(--text-strong); }
.suite-tile img { width: 72px; height: 72px; }

/* The apps: the last line of a card (its link, or "Coming soon") sits at the bottom. */
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.app-mark { width: 48px; height: 48px; margin-bottom: 16px; }
.card .formats { font-size: 14px; line-height: 20px; color: var(--muted); }
.app-soon { margin-top: auto; align-self: flex-start; }
.card .app-open { margin-top: auto; }

/* Two columns: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.oss-copy p { font-size: 20px; line-height: 28px; max-width: 640px; }
.oss-copy .link { display: inline-block; margin-top: 16px; }
.stage-band { padding: 56px 64px; border-radius: 16px; background: var(--grad-violet); }
.stage-band .section-lede { color: var(--text-strong); }

/* Licences page */
.licences-section { margin-top: 0; margin-bottom: var(--section); }
.licences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.licences ul { margin-top: 8px; }
.licences li { padding: 8px 0; border-top: 1px solid var(--border); }
.licences li:first-child { border-top: 0; }
.foot-soon { display: block; padding: 3px 0; }

.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; padding: 24px; }
.card-title { font-size: 20px; line-height: 28px; }
.card p { margin-top: 8px; }
.card .link { margin-top: auto; padding-top: 16px; align-self: flex-start; }

.icon-tile { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 12px; background: var(--accent-subtle); color: var(--accent); }
.icon-tile svg, .menu-button svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.faq details { border-top: 1px solid var(--border-strong); }
.faq details:last-child { border-bottom: 1px solid var(--border-strong); }
.faq summary { position: relative; display: block; padding: 22px 48px 22px 0; font-size: 18px; line-height: 28px; font-weight: 500; color: var(--text-strong); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--ink); transition: transform 200ms var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq details p { padding: 0 48px 24px 0; max-width: 720px; }

/* Closing call to action */
.final-section { margin-bottom: var(--section); }
.final { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 56px 64px; border-radius: 8px; background: var(--grad-warm-band); }
.final-copy p { margin-top: 8px; color: var(--text-strong); }
.final-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-text); border-radius: 80px 80px 0 0; padding: 56px 0 40px; }
.site-footer :focus-visible { outline-color: #7cb8ff; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand-light .wordmark { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.footer-grid h2 { font-size: 18px; line-height: 24px; color: #fff; margin-bottom: 12px; }
.footer-grid a { display: block; width: fit-content; padding: 3px 0; color: var(--footer-text); text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.back-top { margin-top: 40px; text-align: center; }
.back-top a { color: #fff; text-decoration: none; padding: 4px 0; }
.back-top a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--footer-line); font-size: 14px; line-height: 20px; }

/* 404 */
.hero.lost { margin-top: 0; padding: 120px 0 160px; }
.hero.lost.licences-hero { padding-bottom: 48px; }
.lost-inner > * { max-width: 640px; }
.lost h1 { font-size: clamp(2.25rem, 3.6vw, 2.5rem); line-height: 1.1; }
.footer-base.lost-foot { margin-top: 0; border-top: 0; padding-top: 0; }
.lost-foot a { color: #fff; text-underline-offset: 4px; }

/* Section fade-up: only with the script (it adds .js) and only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* Below 1120 px the header's links fold into a menu (with the script; without it they wrap under the brand). */
@media (max-width: 1119px) {
  .bar { gap: 16px; flex-wrap: wrap; padding: 12px 0; }
  .site-menu { flex-basis: 100%; flex-wrap: wrap; gap: 8px 24px; }
  .site-nav { flex-wrap: wrap; gap: 0 24px; }
  html:not(.js) .site-header { position: static; }
  .js .bar { flex-wrap: nowrap; justify-content: space-between; padding: 0; }
  .js .menu-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 40px; border: 1px solid var(--control-border); background: var(--bg); color: var(--text-strong); font: 500 14px/20px var(--font); cursor: pointer; }
  .js .menu-button:hover { background: var(--bg-hover); }
  .js .menu-button .icon-close, .js .menu-button[aria-expanded="true"] .icon-open { display: none; }
  .js .menu-button[aria-expanded="true"] .icon-close { display: block; }
  .js .site-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--border-strong); box-shadow: 0 12px 20px rgba(0, 0, 0, .06); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .js .menu-open .site-menu, .js .site-menu.site-menu-static { display: flex; }
  .js .site-menu.site-menu-static, .site-menu.site-menu-static { position: static; flex: none; flex-basis: auto; flex-direction: row; padding: 0; border: 0; box-shadow: none; background: none; }
  .js .site-nav { flex-direction: column; gap: 0; }
  .js .site-nav a { display: flex; align-items: center; min-height: 48px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .js .bar-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .js .site-menu:not(.site-menu-static) .bar-actions .text-link { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 16px; border: 2px solid var(--ink); border-radius: 40px; color: var(--ink); }
  .js .menu-open .site-header { border-bottom-color: var(--border-strong); }
  [id] { scroll-margin-top: calc(var(--header-h) + 16px); }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --section: 64px; }
  .hero { padding: 128px 0 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-media { max-width: 520px; }
  .split, .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stage-band { padding: 40px 32px; }
  .final { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  h2 { font-size: 28px; line-height: 36px; }
  .hero { margin-top: -64px; padding-top: 104px; }
  .lede { font-size: 18px; line-height: 26px; }
  .cta-row .btn { flex: 1 1 100%; }
  .app-grid, .points, .licences { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .suite { padding: 20px; gap: 12px; }
  .suite-tile { padding: 20px 12px; font-size: 14px; }
  .suite-tile img { width: 56px; height: 56px; }
  .stage-band { padding: 32px 24px; }
  .final { padding: 32px 24px; }
  .final-actions, .final-actions .btn { width: 100%; }
  .site-footer { border-radius: 32px 32px 0 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .footer-base { flex-direction: column; }
}
