/* Lyfe Max — getlyfemax.com
   Tokens are plain CSS variables so they can be lifted into a Shopify theme later. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-opsz-wght.woff2") format("woff2-variations"),
       url("/assets/fonts/fraunces-opsz-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-wght.woff2") format("woff2-variations"),
       url("/assets/fonts/figtree-wght.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* surfaces */
  --paper: #f3f3f0;
  --studio: #d3d5d5;          /* matches the product-photo backdrop */
  --card: #ffffff;
  --night: #111316;
  --night-2: #1a1d21;
  /* ink */
  --ink: #15171a;
  --ink-2: #44494e;
  --ink-3: #5f656b;
  --line: #d4d6d3;
  --night-ink: #eef0ee;
  --night-ink-2: #b6bcbf;
  --night-line: #2c3136;
  /* accent: the lens itself */
  --red: #b3171d;
  --red-bright: #f0443a;
  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* rhythm */
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 420; letter-spacing: -0.015em; line-height: 1.08; margin: 0 0 0.5em; text-wrap: balance; font-variation-settings: "opsz" 120; }
h1 { font-size: clamp(3rem, 8vw, 6.4rem); font-weight: 380; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.375rem; font-variation-settings: "opsz" 36; letter-spacing: -0.005em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.eyebrow { font: 600 0.78rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1.1rem; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 38ch; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; text-decoration: none; }
.skip:focus { top: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 48px; padding: 0 1.4rem; border-radius: 999px; font: 600 0.98rem/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; transition: background-color .2s, color .2s, border-color .2s; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--red); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 650 1.12rem/1 var(--sans); letter-spacing: 0.01em; }
.brand img { width: 74px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .btn { min-height: 42px; padding: 0 1.1rem; font-size: 0.9rem; color: #fff; }
.nav .btn:hover { color: #fff; text-decoration: none; }
@media (max-width: 820px) { .nav a:not(.btn) { display: none; } }
.brand span, .btn { white-space: nowrap; }
@media (max-width: 420px) {
  .brand img { width: 58px; }
  .brand { gap: 9px; font-size: 1.02rem; }
  .nav .btn { padding: 0 0.95rem; font-size: 0.86rem; }
}

/* hero */
.hero { background: var(--studio); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(16px, 4vw, 56px); min-height: min(86vh, 760px); padding-block: clamp(48px, 7vw, 88px); }
.hero h1 { margin-bottom: 0.32em; }
.hero .sub { font: 450 clamp(1.25rem, 2vw, 1.55rem)/1.35 var(--display); font-variation-settings: "opsz" 30; color: var(--ink); max-width: 30ch; margin-bottom: 1rem; }
.hero .lede { color: #3b4045; }
.hero .eyebrow { color: #41464b; }
.hero-figure { margin: 0; position: relative; }
.hero-figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  /* fade every edge into the studio backdrop so the photo has no visible box */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-composite: intersect; }
.hero-meta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; color: #3b4045; padding: 0; list-style: none; }
.hero-meta li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 9px; vertical-align: 2px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 36px; }
  .hero-figure { order: -1; margin-inline: calc(var(--gutter) * -0.5); }
  .hero-figure img { aspect-ratio: 4 / 3; }
}

/* sections */
.section { padding-block: var(--section); }
.section-head { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); margin: 0; max-width: 52ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* product */
.product-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(14px, 2vw, 22px); }
.product-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--studio); }
.product-grid figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3.2; }
.product-grid figure:last-child img { aspect-ratio: auto; }
.product-grid figcaption { font-size: 0.82rem; color: var(--ink-3); padding: 10px 14px 12px; background: var(--paper); }
@media (max-width: 760px) { .product-grid { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.features li { padding: 26px 0 28px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.2rem 1fr; }
.features .n { font: 500 0.85rem/1.9 var(--sans); color: var(--red); letter-spacing: 0.06em; }
.features h3 { margin-bottom: 0.35em; }
.features p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

.use-note { margin-top: 32px; padding: 18px 22px; border-radius: var(--radius); background: #e9e9e4; color: var(--ink-2); font-size: 0.95rem; max-width: 820px; }
.use-note strong { color: var(--ink); }

/* lens data — the night band */
.night { background: var(--night); color: var(--night-ink); }
.night .eyebrow { color: #9aa2a7; }
.night .section-head p { color: var(--night-ink-2); }
.night a { color: var(--night-ink); }
.claim { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.claim-figure { font-family: var(--display); font-weight: 360; font-size: clamp(4rem, 10vw, 7.5rem); line-height: 0.95; letter-spacing: -0.04em; color: #fff; margin: 0 0 0.25em; font-variation-settings: "opsz" 144; }
.claim-figure span { color: var(--red-bright); }
.claim-text { font-size: 1.1rem; color: var(--night-ink); max-width: 44ch; }
.claim-qual { color: var(--night-ink-2); font-size: 0.98rem; max-width: 52ch; border-left: 0; padding: 0; }
.chart { margin: 0; background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--radius); padding: clamp(16px, 2.5vw, 26px); }
.chart svg { width: 100%; height: auto; font-family: var(--sans); }
.chart figcaption { font-size: 0.82rem; line-height: 1.5; color: var(--night-ink-2); margin-top: 12px; }
.lab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: clamp(40px, 6vw, 64px) 0 0; border-top: 1px solid var(--night-line); }
.lab div { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--night-line); }
.lab dt { font: 600 0.74rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #9aa2a7; margin-bottom: 6px; }
.lab dd { margin: 0; font-size: 0.98rem; color: var(--night-ink); }
@media (max-width: 860px) { .claim { grid-template-columns: 1fr; } .lab { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lab { grid-template-columns: 1fr; } }
details.readings { margin-top: 28px; border: 1px solid var(--night-line); border-radius: var(--radius); background: var(--night-2); }
details.readings summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style-position: inside; }
details.readings .tbl { padding: 0 20px 20px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
th, td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--night-line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa2a7; }
tr.edge td { color: #fff; font-weight: 600; }

/* fit */
.fit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.dims { margin: 0; border-top: 1px solid var(--line); }
.dims div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dims dt { color: var(--ink-2); }
.dims dd { margin: 0; font: 450 1.35rem/1 var(--display); font-variation-settings: "opsz" 30; text-align: right; }
.dims dd small { display: block; font: 400 0.8rem/1.4 var(--sans); color: var(--ink-3); margin-top: 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 3.2rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 600 0.9rem/1 var(--sans); }
.steps h3 { font-size: 1.2rem; margin-bottom: 0.25em; padding-top: 0.15em; }
.steps p { color: var(--ink-2); margin: 0; }
.fit-note { margin-top: 10px; font-size: 0.9rem; color: var(--ink-3); }
@media (max-width: 860px) { .fit { grid-template-columns: 1fr; } }

/* included */
.included { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.included figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #e2e6e5; }
.included ul { list-style: none; padding: 0; margin: 1.4rem 0 0; border-top: 1px solid var(--line); }
.included li { padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .included { grid-template-columns: 1fr; } }

/* about */
.about { background: #e9e9e4; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 6vw, 96px); }
.founder { font: 420 clamp(1.5rem, 2.6vw, 2.1rem)/1.3 var(--display); font-variation-settings: "opsz" 60; letter-spacing: -0.01em; margin: 0 0 1.2rem; }
.principles { list-style: none; padding: 0; margin: 0; border-top: 1px solid #cfd0ca; }
.principles li { padding: 18px 0; border-bottom: 1px solid #cfd0ca; }
.principles strong { display: block; font-weight: 650; margin-bottom: 2px; }
.principles span { color: var(--ink-2); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* updates + contact */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input[type="email"] { flex: 1 1 240px; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1.5px solid #b9bdbd; background: #fff; font: 400 1rem var(--sans); color: var(--ink); }
.form-row input[type="email"]:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-color: var(--ink); }
.form-row .btn { min-height: 52px; }
.form-label { display: block; font-weight: 600; margin-bottom: 10px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-line { margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.contact-line a { font: 450 1.35rem/1.2 var(--display); font-variation-settings: "opsz" 30; }
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 0.9rem; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: start; }
.footer-grid .brand img { width: 64px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-2); display: inline-block; padding: 8px 0; }
.contact-line a { display: inline-block; padding: 6px 0; }
.footer-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

/* legal / simple pages */
.doc { padding-block: clamp(48px, 8vw, 96px); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; font-variation-settings: "opsz" 36; letter-spacing: -0.005em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.5em; }
.doc .updated { color: var(--ink-3); font-size: 0.95rem; }

/* lens chart on small screens: bigger type, fewer annotations */
@media (max-width: 600px) {
  .chart { padding: 14px 10px 16px 14px; }
  .chart svg { overflow: visible; }
  .chart svg text { font-size: 21px; }
  .chart figcaption::before { content: "Horizontal axis: wavelength (nm). "; }
  .chart svg .hide-sm { display: none; }
}
