/* daios.ai: one hand-written stylesheet (no framework), light and dark.
   1 Tokens  2 Base elements  3 Header and footer  4 Hero  5 Bands  6 Small screens
   The layout follows apple.com: full-width bands, each with a heading, one line, pill links and a
   large image. */

/* 1. Tokens. Each colour is light-dark(light, dark); theme-switcher.js sets data-theme on <html>. */
:root {
  color-scheme: light dark;
  --page: light-dark(#ffffff, #1f1f1f);       /* odd bands */
  --band: light-dark(#f2f2f2, #0d0d0d);       /* even bands */
  --ink: light-dark(#1d1d1f, #f5f5f7);        /* headings */
  --text: light-dark(#373c44, #c2c7d0);       /* body */
  --muted: light-dark(#6e6e73, #86868b);
  --line: light-dark(#d2d2d7, #424245);
  --nav: light-dark(rgba(255, 255, 255, .8), rgba(22, 22, 23, .8));
  --red: #ff4d4f;
  --red-hover: #e03a3c;
  --wide: 980px;
  --gutter: max(5vw, 16px);
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

/* Images that exist in two versions: class="theme-light" and class="theme-dark". */
.theme-dark { display: none !important; }
:root[data-theme=dark] .theme-light { display: none !important; }
:root[data-theme=dark] .theme-dark { display: revert !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-light { display: none !important; }
  :root:not([data-theme]) .theme-dark { display: revert !important; }
}

/* 2. Base elements. */
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 60px; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.47 "Inter", system-ui, sans-serif; overflow-x: clip; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -.022em; line-height: 1.07; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 64px); }
h2 { font-size: clamp(36px, 4.8vw, 56px); }
h3 { font-size: clamp(28px, 3.2vw, 40px); }
p { margin: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Pill links: filled by default, outlined with class="pill outline". */
.pill { display: inline-block; font: inherit; font-size: 17px; line-height: 1.2; padding: 11px 22px; border-radius: 980px; border: 1px solid var(--red); background: var(--red); color: #fff; cursor: pointer; white-space: nowrap; }
.pill:hover { background: var(--red-hover); border-color: var(--red-hover); text-decoration: none; }
.pill.outline { background: transparent; color: var(--red); }
.pill.outline:hover { background: var(--red); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 20px; }
.hero .pills { margin-top: 28px; }

/* 3. Header and footer. */
header { position: sticky; top: 0; z-index: 10; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); padding-inline: var(--gutter); }
header nav { max-width: var(--wide); margin-inline: auto; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
header .logo { display: flex; }
header .logo img { height: 24px; width: auto; }
header ul { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); margin: 0; padding: 0; list-style: none; font-size: 13px; }
header ul a { color: var(--ink); opacity: .82; }
header ul a:hover { opacity: 1; text-decoration: none; }
.theme-toggle { font-size: 15px; }

footer { background: var(--band); color: var(--muted); font-size: 12px; padding: 20px var(--gutter) 28px; }
footer > div { max-width: var(--wide); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; }
footer ul { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
footer a { color: var(--text); }

/* 4. Hero: coloured blurs behind the mark, the headline and the contact link. */
.hero { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(64px, 9vw, 110px); background: light-dark(#fbfbfd, #050507); }
.hero::before { content: ""; position: absolute; inset: -20%; z-index: -1; filter: blur(70px); opacity: .55;
  background:
    radial-gradient(34% 42% at 18% 30%, #ff4d4f 0, transparent 70%),
    radial-gradient(30% 40% at 82% 24%, #7c5cff 0, transparent 70%),
    radial-gradient(32% 44% at 68% 82%, #1fa2ff 0, transparent 70%),
    radial-gradient(28% 38% at 30% 86%, #ffb347 0, transparent 70%),
    radial-gradient(24% 30% at 50% 48%, #ff5fa2 0, transparent 70%); }
.hero > img { height: clamp(84px, 11vw, 124px); width: auto; margin-bottom: 22px; }
.hero h1 { max-width: 14em; margin-inline: auto; }
.hero p { max-width: 34em; margin: 16px auto 0; font-size: clamp(19px, 2.1vw, 24px); line-height: 1.3; color: var(--ink); }

/* 5. Bands: alternate background; heading, one line, pills, then the image. */
.band { text-align: center; padding: clamp(48px, 6vw, 64px) var(--gutter) clamp(56px, 7vw, 80px); background: var(--band); }
.band:nth-of-type(odd) { background: var(--page); }
.band > p { max-width: 30em; margin: 8px auto 0; font-size: clamp(19px, 2.3vw, 28px); line-height: 1.2; color: var(--ink); }
.band .shot { display: block; width: min(100%, var(--wide)); margin: clamp(32px, 5vw, 56px) auto 0; border-radius: 18px; }
.band .shot.paper { width: min(100%, 780px); border-radius: 14px 14px 0 0; box-shadow: 0 10px 50px rgba(0, 0, 0, .28); }
.band .shot.framed { border: 1px solid var(--line); box-shadow: 0 10px 50px rgba(0, 0, 0, .28); }
.band.flush { padding-bottom: 0; }           /* the image runs to the band's bottom edge */
.band.page { min-height: 60svh; }
.band.page > img { width: min(320px, 70%); margin-bottom: 12px; }
.band.page > p + p { margin-top: 24px; }

/* 6. Small screens. */
@media (max-width: 734px) {
  header ul li:nth-child(-n+3) { display: none; }
}
