/* ── theme.css ── */
/* HOYA Lens Australia theme: fonts, tokens, base and the shared pieces every section uses (the column, section bands,
   eyebrow with its rule, giant word, headings, lead, buttons, dots and checks lists, the figure card). Each section's own
   CSS lives in its section.css, scoped under its root class. Class prefix: hy-. Read docs/CONVERTING.md first. */

/* ── Fonts: self-hosted Latin subsets, one variable file each (Noto Sans 400–700, Noto Sans Display 200–300), with
   metric-matched fallbacks so nothing moves when they arrive (CLS). Both are preloaded (theme.json preloadFonts). ── */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(assets/fonts/noto-sans-400-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Display"; font-style: normal; font-weight: 200 300; font-display: swap;
  src: url(assets/fonts/noto-sans-display-200-300-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 107.15%; ascent-override: 99.77%; descent-override: 27.35%; line-gap-override: 0%; }
@font-face { font-family: "Noto Sans Display Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"); size-adjust: 95.1%; ascent-override: 112.41%; descent-override: 30.81%; line-gap-override: 0%; }

:root {
  /* Standard tokens (contract §3), from the concept's palette (site.css) */
  --ve-color-bg: #ffffff;
  --ve-color-surface: #f4f8fb;          /* the light blue-grey of the tinted bands */
  --ve-color-text: #333a40;
  --ve-color-muted: #6b7680;
  --ve-color-line: #dcdcdc;
  --ve-color-accent: #0068b6;           /* HOYA blue: headings, buttons, links */
  --ve-color-accent-contrast: #ffffff;
  --ve-color-inverse-bg: #0068b6;       /* the blue footer */
  --ve-color-inverse-text: #ffffff;
  --ve-font-display: "Noto Sans Display", "Noto Sans Display Fallback", "Noto Sans", system-ui, sans-serif;
  --ve-font-body: "Noto Sans", "Noto Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ve-radius: 8px;
  --ve-radius-lg: 12px;
  --ve-space-section: clamp(72px, 7.6vw, 110px);
  --ve-max-width: 1180px;

  /* HOYA */
  --hy-ink: #1d2329;                    /* dark words: lead text, bold labels */
  --hy-blue-dark: #005fa7;              /* hovers, the Back to top block */
  --hy-blue-light: #e5f0f8;             /* panels, check marks */
  --hy-blue-mid: #c4e0f5;               /* the eyebrow rule, soft giant words, tile borders */
  --hy-soft: #cfe2f1;                   /* a soft giant word */
  --hy-tint-mid: color-mix(in srgb, var(--ve-color-surface), var(--ve-color-bg)); /* halfway down a tint band */
  --hy-gutter: 24px;
  --hy-head: 110px;                     /* the header: 34 px utility bar + 76 px bar (96 px on phones) */
  --hy-ease: cubic-bezier(.22, 1, .36, 1);

  /* The header is sticky and takes its own room: sticky panels stop below it (contract §3, §16.6). */
  --ve-sticky-top: calc(var(--ve-top-offset, 0px) + var(--hy-head));
}
@media (max-width: 760px) { :root { --hy-head: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hy-head) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ve-color-bg); color: var(--ve-color-text); font: 400 16px/1.85 var(--ve-font-body); letter-spacing: .03em; overflow-x: clip; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ve-color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ve-color-accent); font-weight: 700; letter-spacing: .03em; line-height: 1.35; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ve-color-accent); outline-offset: 2px; }
main:focus { outline: none; }
/* The header section is the slot's only child: let it stick to the page, not to the slot. */
.hy-site > [data-slot="header"] { display: contents; }
.hy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── The column and the bands. Every section is <section class="hy-<key> hy-sec" data-tone="{{tone}}"> with its
   content in <div class="hy-wrap">. Tones: white (default), tint (white fading up from light blue-grey), mist (the
   Explore band's soft blue glow), blue (HOYA blue, white words). _spaceTop/_spaceBottom small = the concept's tight
   bands (70 px). ── */
.hy-wrap { width: 100%; max-width: var(--ve-max-width); margin-inline: auto; padding-inline: var(--hy-gutter); }
.hy-sec { position: relative; padding-block: var(--ve-space-section); background: var(--ve-color-bg); }
.hy-sec[data-tone="tint"] { background: linear-gradient(180deg, var(--ve-color-surface), var(--ve-color-bg)); }
/* One tint band drawn by several sections (the concept's .sec.tint holding two components): a tint section with no
   top space (_spaceTop none) right after another tint section continues the band instead of starting the fade again.
   The first fades to halfway, the last from halfway to white, any between stay halfway. */
.hy-sec[data-tone="tint"]:has(+ .hy-sec[data-tone="tint"][data-space-top="none"]) { background: linear-gradient(180deg, var(--ve-color-surface), var(--hy-tint-mid)); }
.hy-sec[data-tone="tint"] + .hy-sec[data-tone="tint"][data-space-top="none"] { background: linear-gradient(180deg, var(--hy-tint-mid), var(--ve-color-bg)); }
.hy-sec[data-tone="tint"] + .hy-sec[data-tone="tint"][data-space-top="none"]:has(+ .hy-sec[data-tone="tint"][data-space-top="none"]) { background: var(--hy-tint-mid); }
.hy-sec[data-tone="mist"] { background: radial-gradient(ellipse at 85% 30%, #e3eef7, transparent 60%), #f5f8fb; }
.hy-sec[data-tone="blue"] { background: var(--ve-color-accent); color: #fff; }
.hy-sec[data-space-top="small"] { padding-top: clamp(48px, 5vw, 70px); }
.hy-sec[data-space-top="none"] { padding-top: 0; }
.hy-sec[data-space-bottom="small"] { padding-bottom: clamp(48px, 5vw, 70px); }
.hy-sec[data-space-bottom="none"] { padding-bottom: 0; }

/* Page speed: a section off screen isn't laid out or painted until it nears the viewport. Never the first two (on
   screen as the page opens) and never in the editor, which measures every section. */
html:not([data-ve-mode="edit"]) main > .hy-sec:nth-child(n+3) { content-visibility: auto; contain-intrinsic-size: auto 760px; }

/* ── Section heads: the eyebrow (bold blue words with a short rule after them) and the giant word (Noto Sans Display
   200, uppercase). Neither is a heading: the section's <h2> carries the meaning. ── */
.hy-eyebrow { display: flex; align-items: center; gap: 14px; margin: 0; color: var(--ve-color-accent); font-weight: 700; font-size: 14px; line-height: 1.6; letter-spacing: .04em; }
.hy-eyebrow::after { content: ""; flex: none; width: 46px; height: 1px; background: var(--hy-blue-mid); }
.hy-giant { margin: 8px 0 40px; color: var(--ve-color-accent); font: 200 clamp(54px, 9.5vw, 128px)/1 var(--ve-font-display); letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.hy-giant[data-tone="soft"] { color: var(--hy-soft); }
/* On a white band the pale word needs 3:1 (large text) to pass contrast checks; tint, mist and blue bands keep the
   concept's pale blue. */
.hy-sec:not([data-tone="tint"], [data-tone="mist"], [data-tone="blue"]) .hy-giant[data-tone="soft"] { color: #4f93cc; }
/* .hy-head wraps an eyebrow and a giant word (either may be left out): 40 px above what follows. */
.hy-head { margin-bottom: 40px; }
.hy-head .hy-giant { margin-bottom: 0; }
.hy-head:has(> .hy-eyebrow:only-child) { margin-bottom: 24px; }
.hy-head:not(:has(> *)) { display: none; }

/* ── Type ── */
.hy-h2 { margin: 0 0 22px; color: var(--ve-color-accent); font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.35; }
.hy-h3 { margin: 0 0 14px; color: var(--ve-color-accent); font-size: 20px; font-weight: 700; line-height: 1.35; }
.hy-lead { color: var(--hy-ink); font-size: 18px; }
.hy-lead p + p { margin-top: 1em; }
.hy-prose > * + * { margin-top: 1.1em; }
.hy-prose h3 { margin-top: 1.6em; color: var(--ve-color-accent); font-size: 20px; }
.hy-prose strong, .hy-prose b { color: var(--hy-ink); }
.hy-prose ul:not([class]) { list-style: none; margin-block: 6px 0; padding: 0; }
.hy-prose ul:not([class]) > li, .hy-dots > li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid #eee; }
.hy-prose ul:not([class]) > li::before, .hy-dots > li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--ve-color-accent); }
.hy-dots { list-style: none; margin: 6px 0 0; padding: 0; }
.hy-dots b, .hy-dots strong { color: var(--hy-ink); }

/* Check cards: a grid of bordered white cards, each with a blue tick in a pale circle and an optional bold title. */
.hy-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hy-checks[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hy-checks > li { position: relative; padding: 22px 22px 22px 58px; border: 1px solid var(--ve-color-line); border-radius: 10px; background: #fff; line-height: 1.6; }
.hy-checks > li::before { content: ""; position: absolute; left: 22px; top: 24px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--hy-blue-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230068b6' stroke-width='2'/%3E%3C/svg%3E") center / 20px no-repeat; }
.hy-checks__t { display: block; margin-bottom: 4px; color: var(--hy-ink); font-weight: 700; }
@media (max-width: 760px) { .hy-checks[data-cols="2"] { grid-template-columns: 1fr; } }

/* ── Buttons. .hy-btn: the outlined button with an arrow at the far end (fills blue on hover); .hy-btn--w the white
   outline on a picture; .hy-btn--solid filled blue. .hy-more: words with the arrow in a circle. ── */
.hy-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-width: 240px; min-height: 52px; padding: 14px 22px;
  border: 1px solid var(--ve-color-accent); border-radius: var(--ve-radius); background: #fff; color: var(--ve-color-accent);
  font-size: 13.5px; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background-color .25s, color .25s; }
.hy-btn::after { content: "→"; flex: none; font-size: 16px; transition: transform .25s; }
.hy-btn:hover { background: var(--ve-color-accent); color: #fff; text-decoration: none; }
.hy-btn:hover::after { transform: translateX(4px); }
.hy-btn--w { border-color: #fff; background: transparent; color: #fff; }
.hy-btn--w:hover { background: #fff; color: var(--ve-color-accent); }
.hy-btn--solid { background: var(--ve-color-accent); color: #fff; }
.hy-btn--solid:hover { background: var(--hy-blue-dark); }
@media (max-width: 760px) { .hy-btn { min-width: 0; gap: 24px; } }
.hy-more { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ve-color-accent); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.hy-more::after { content: "→"; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 50%; font-size: 14px; letter-spacing: 0; transition: background-color .25s, color .25s; }
.hy-more:hover { text-decoration: none; }
.hy-more:hover::after { background: var(--ve-color-accent); border-color: var(--ve-color-accent); color: #fff; }

/* ── The figure card: a bordered card with an optional caption bar (bold title, muted line) over one or two pictures.
   data-win paints the caption bar blue (the HOYA lens in a comparison); data-fit="contain" pads a diagram. ── */
.hy-fig { display: flex; flex-direction: column; margin: 0; border: 1px solid var(--ve-color-line); border-radius: var(--ve-radius-lg); overflow: hidden; background: #fff; }
.hy-fig__cap { padding: 20px 22px 18px; border-bottom: 1px solid var(--ve-color-line); }
.hy-fig__cap b { display: block; color: var(--hy-ink); font-size: 16px; }
.hy-fig__cap span { display: block; margin-top: 3px; color: var(--ve-color-muted); font-size: 14px; line-height: 1.55; }
.hy-fig[data-win] { border-color: var(--ve-color-accent); }
.hy-fig[data-win] .hy-fig__cap { border-color: var(--ve-color-accent); background: var(--ve-color-accent); }
.hy-fig[data-win] .hy-fig__cap :is(b, span) { color: #fff; }
.hy-fig__pics { display: flex; flex: 1; background: #f3f6f9; }
.hy-fig__pics img, .hy-fig__pics > picture > img { flex: 1; width: 100%; min-width: 0; object-fit: cover; }
.hy-fig[data-fit="contain"] .hy-fig__pics { align-items: center; justify-content: center; padding: 22px; }
.hy-fig[data-fit="contain"] .hy-fig__pics :is(img, picture > img) { flex: 0 1 auto; width: auto; max-height: 360px; object-fit: contain; }
.hy-fig[data-plain] .hy-fig__pics { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
