/* Flow Office Suite. Light tokens mirror SuiteColors (Writer's cool palette);
   the dark brand surfaces use brandPanel, as FlowBrandBackdrop does. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/assets/fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/assets/fonts/Inter-Medium.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/assets/fonts/Inter-SemiBold.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --paper: #FFFFFF;
  --canvas: #F7F7F6;
  --surface: #EFEFED;
  --hover: #E8E8E6;
  --line: #ECECEA;
  --ink: #1A1A1A;
  --secondary: #5F5F5C;
  --muted: #8A8A87;
  --on-ink: #FFFFFF;
  --brand: #141414;
  --mail: #E5384F;
  --presenter: #EA6A0A;
  --sheets: #2FA84F;
  --writer: #2B7BE4;
  --radius: 8px;
  --radius-large: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1E1D;
    --canvas: #191918;
    --surface: #2F2F2D;
    --hover: #383836;
    --line: #343432;
    --ink: #E6E6E6;
    --secondary: #B4B4B1;
    --muted: #9A9A97;
    --on-ink: #1A1A1A;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1240px, 100% - 32px); margin-inline: auto; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--secondary); max-width: 34em; }

/* Icons from Flow Suite Icons, tinted with the text colour. */
.i {
  display: inline-block; width: 20px; height: 20px; flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.i-download { --i: url(/assets/ui/download.svg); }
.i-lock { --i: url(/assets/ui/lock.svg); }
.i-plugin { --i: url(/assets/ui/plugin.svg); }
.i-check { --i: url(/assets/ui/check.svg); }
.i-monitor { --i: url(/assets/ui/monitor.svg); }
.i-smartphone { --i: url(/assets/ui/smartphone.svg); }
.i-tablet { --i: url(/assets/ui/tablet.svg); }
.i-cloud { --i: url(/assets/ui/cloud.svg); }

/* Logo: letter template tinted with the text colour, the colour ball placed
   as make_flow_logo.py puts it. */
.flow-logo { position: relative; display: inline-block; height: 26px; aspect-ratio: 2.7905; color: inherit; flex: none; }
.flow-logo__letters {
  position: absolute; inset: 0; background: currentColor;
  -webkit-mask: url(/assets/logo/flow-letters.png) center / contain no-repeat;
  mask: url(/assets/logo/flow-letters.png) center / contain no-repeat;
}
.flow-logo__ball { position: absolute; left: 34.57%; top: 23.67%; width: 27.30%; height: auto; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: var(--radius);
  background: var(--ink); color: var(--on-ink);
  font: 500 16px/1 Inter, sans-serif; text-decoration: none; white-space: nowrap;
  transition: opacity .12s ease, background-color .12s ease;
}
.button:hover { opacity: .86; }
.button--light { background: #FFFFFF; color: #1A1A1A; }
.button--ghost { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.button--ghost:hover { opacity: 1; background: rgba(255, 255, 255, .16); }
.button--quiet { background: var(--surface); color: var(--ink); }
.button--quiet:hover { opacity: 1; background: var(--hover); }
.button--small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.button[aria-disabled="true"] { color: var(--muted); cursor: default; }
.button[aria-disabled="true"]:hover { background: var(--surface); }
:focus-visible { outline: 2px solid var(--writer); outline-offset: 2px; border-radius: 4px; }

/* The colour glow: the four app colours, softly blurred, on brandPanel. */
.glow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glow::before {
  content: ""; position: absolute; inset: -20% -10% 20%;
  background:
    radial-gradient(38% 46% at 22% 30%, color-mix(in srgb, var(--mail) 55%, transparent), transparent 70%),
    radial-gradient(34% 42% at 44% 14%, color-mix(in srgb, var(--presenter) 50%, transparent), transparent 70%),
    radial-gradient(36% 44% at 64% 26%, color-mix(in srgb, var(--sheets) 45%, transparent), transparent 70%),
    radial-gradient(40% 50% at 82% 38%, color-mix(in srgb, var(--writer) 60%, transparent), transparent 70%);
  filter: blur(56px) saturate(1.25);
  opacity: .8;
}
.glow--soft::before { opacity: .45; inset: 10% -10% -20%; }

/* Header: the dark brand bar. */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--brand) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a:not(.button) {
  padding: 6px 10px; border-radius: var(--radius);
  font-size: 15px; color: rgba(255, 255, 255, .72); text-decoration: none;
}
.site-header nav a:not(.button):hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.site-header nav .button { margin-left: 8px; }
@media (max-width: 560px) { .nav-section { display: none; } }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand); color: #FFFFFF;
  padding-top: clamp(72px, 11vw, 128px);
  text-align: center;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero h1 { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.flow-logo--hero { height: clamp(64px, 9vw, 104px); }
.hero-name { font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; letter-spacing: -0.01em; color: rgba(255, 255, 255, .72); }
.hero .lead { margin-top: 24px; color: rgba(255, 255, 255, .78); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.icon-row { display: flex; justify-content: center; gap: 14px; margin-top: 44px; }
.icon-row img { width: 60px; height: 60px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.hero-shot { position: relative; margin-top: clamp(48px, 7vw, 80px); margin-bottom: -2px; }
.hero-shot img {
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .08), 0 40px 120px -20px rgba(0, 0, 0, .7);
}

/* Programs: one per row, alternating, each lit in its own colour. */
.programs { display: flex; flex-direction: column; gap: clamp(72px, 11vw, 140px); padding-block: clamp(80px, 12vw, 152px); }
.program { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: clamp(32px, 5vw, 72px); --accent: var(--writer); }
.program--mail { --accent: var(--mail); }
.program--presenter { --accent: var(--presenter); }
.program--sheets { --accent: var(--sheets); }
.program--writer { --accent: var(--writer); }
.program--flip .program-text { order: 2; }
.program-name { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; color: var(--accent); }
.program-name img { width: 44px; height: 44px; }
.program h2 { margin-top: 20px; font-size: clamp(26px, 3vw, 34px); }
.program p { margin-top: 16px; color: var(--secondary); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  font-size: 14px; font-weight: 500;
}
.chips .i { width: 16px; height: 16px; color: var(--accent); }
.program-shot { position: relative; isolation: isolate; }
.program-shot::before {
  content: ""; position: absolute; inset: 8% 6%; z-index: -1;
  background: var(--accent); filter: blur(70px); opacity: .28; border-radius: 50%;
}
.program-shot img {
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 30px 70px -30px rgba(0, 0, 0, .35);
}
.program--mail .program-shot img { border: 0; border-radius: 16px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .4); }
@media (max-width: 820px) {
  .program { grid-template-columns: 1fr; }
  .program--flip .program-text { order: 0; }
}

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-top: 40px; }
.card-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card-grid li { padding: 28px; border-radius: var(--radius-large); background: var(--paper); }
.card-grid .i { width: 32px; height: 32px; margin-bottom: 20px; }
.card-grid p { margin-top: 8px; color: var(--secondary); }

.platforms { padding-block: clamp(72px, 10vw, 128px); background: var(--canvas); }
.platforms .lead { margin-top: 16px; }
.platforms .card-grid li:nth-child(1) .i { color: var(--writer); }
.platforms .card-grid li:nth-child(2) .i { color: var(--presenter); }
.platforms .card-grid li:nth-child(3) .i { color: var(--mail); }
.platforms .card-grid li:nth-child(4) .i { color: var(--sheets); }

/* AI: dark band with the glow. */
.dark-band { position: relative; overflow: hidden; padding-block: clamp(80px, 11vw, 136px); background: var(--brand); color: #FFFFFF; }
.dark-band .wrap { position: relative; }
.dark-band .card-grid li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.dark-band .card-grid p { color: rgba(255, 255, 255, .72); }

/* Download */
.download { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(80px, 12vw, 152px) 0; }
.download-icon { width: 96px; height: 96px; margin-bottom: 24px; filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .18)); }
.download .lead { margin-top: 16px; }
.download-action { margin-top: 32px; }
.download-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.checksum { margin-top: 8px; font-size: 13px; color: var(--muted); }
.checksum summary { cursor: pointer; }
.checksum code { display: block; margin-top: 4px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

/* Footer */
.site-footer { margin-top: clamp(80px, 12vw, 152px); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-block: 32px; }
.footer-row .flow-logo { height: 22px; margin-right: auto; color: var(--ink); }
.footer-row a:not(.flow-logo) { text-decoration: none; }
.footer-row a:not(.flow-logo):hover { color: var(--ink); }

/* Language menu in the header */
.i-chevron-down { --i: url(/assets/ui/chevron-down.svg); }
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.lang-menu { position: relative; }
.lang-menu summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 6px 8px 6px 10px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .72);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.lang-menu summary .i { width: 14px; height: 14px; transition: transform .15s ease; }
.lang-menu[open] summary .i { transform: rotate(180deg); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px;
  background: #242423; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, .5);
}
.site-header .lang-menu a {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 6px;
  font-size: 15px; color: #FFFFFF; text-decoration: none;
}
.lang-menu a:hover { background: rgba(255, 255, 255, .08); }
.lang-menu a .i { width: 16px; height: 16px; margin-left: auto; color: rgba(255, 255, 255, .72); }
