/* withartur.io: tokens and shared components.
   :root holds the Editorial values (the default look). look-apple.css overrides tokens
   under html[data-look="apple"]; look-editorial.css and look-apple.css add the few
   shapes a token cannot express. Every component below is written against tokens only.
   Phone first: base = 375 px, then 768 and 1100. */

:root {
  /* colour */
  --paper: #ffffff;        /* page */
  --paper-2: #ffffff;      /* alternate band (Apple uses a light grey) */
  --surface: #ffffff;      /* cards and tiles */
  --ink: #0a0a0a;          /* headlines, primary text */
  --ink-2: #2b2b2b;        /* body */
  --ink-3: #595959;        /* labels, captions */
  --ink-dim: #6f6f6f;      /* the dimmed headline sentence (passes 4.5:1) */
  --rule: #0a0a0a;         /* structural hairline */
  --rule-soft: #dcdcdc;    /* hairline between items */
  --mark: #ffe600;         /* one meaning only: a measured value */
  --mast-bg: #ffffff;

  /* type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --w-display: 900;
  --w-head: 800;           /* .h-1, .h-2 */
  --track-display: -.045em;
  --track-head: -.03em;
  --lh-display: .98;     /* .94 let descenders touch the next line's i dots in Archivo 900 */
  --fs-display: 44px;
  --fs-h1: 34px;
  --fs-h2: 24px;
  --fs-lead: 19px;
  --fs-body: 17px;
  --fs-value: 36px;        /* measure values */
  --w-value: 900;

  /* labels (.kick, .caption, nav, switch): mono caps in Editorial */
  --font-label: var(--font-mono);
  --fs-label: 12px;
  --w-label: 500;
  --track-label: .08em;
  --case-label: uppercase;

  /* shape */
  --radius: 0;
  --radius-tile: 0;
  --radius-btn: 0;
  --radius-mark: 0;
  --shadow-tile: none;
  --shadow-card: none;
  --photo-filter: grayscale(1) contrast(1.06);
  --rule-w: 1px;
  --btn-h: 48px;
  --btn-w: 18rem;          /* slab width on wide screens; 100% on phones */

  /* space */
  --gutter: clamp(16px, 4vw, 56px);
  --wrap: 1160px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 112px;
  --band-pad: var(--space-5);
}
@media (min-width: 768px) {
  :root { --fs-display: 60px; --fs-h1: 44px; --fs-h2: 28px; --fs-lead: 21px; --fs-value: 52px; }
}
@media (min-width: 1100px) {
  :root { --fs-display: 84px; --fs-h1: 56px; --fs-h2: 30px; --fs-lead: 22px; --fs-value: 64px; --band-pad: var(--space-6); }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' 0, 'cv11' 1;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.skip {
  position: absolute; left: var(--space-2); top: -100px; z-index: 50;
  padding: 12px 16px; background: var(--ink); color: var(--paper); text-decoration: none;
}
.skip:focus { top: var(--space-1); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding-block: var(--band-pad); }
.band--alt { background: var(--paper-2); }

/* ---------- type ---------- */
.kick, .caption {
  margin: 0;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  font-weight: var(--w-label);
  letter-spacing: var(--track-label);
  text-transform: var(--case-label);
  line-height: 1.5;
  color: var(--ink-3);
}
.h-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  color: var(--ink);
  text-wrap: balance;
}
.h-1, .h-2 { margin: 0; font-family: var(--font-display); font-weight: var(--w-head); letter-spacing: var(--track-head); color: var(--ink); text-wrap: balance; }
.h-1 { font-size: var(--fs-h1); line-height: 1.02; }
.h-2 { font-size: var(--fs-h2); line-height: 1.15; }
.lead { margin: 0; font-size: var(--fs-lead); line-height: 1.45; color: var(--ink); max-width: 34em; text-wrap: pretty; }
.body { margin: 0; color: var(--ink-2); max-width: 38em; text-wrap: pretty; }
.dim { color: var(--ink-dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h); padding: 0 22px;
  border: var(--rule-w) solid var(--ink); border-radius: var(--radius-btn);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-row { display: flex; flex-direction: column; gap: 12px; margin: 0; }
@media (min-width: 560px) { .btn-row { flex-direction: row; flex-wrap: wrap; } }

/* ---------- masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: 20;
  background: var(--mast-bg);
  border-bottom: var(--rule-w) solid var(--rule);
}
.mast__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 60px; }
.mast__name {
  font-family: var(--font-display); font-weight: var(--w-head); font-size: 19px; letter-spacing: -.02em;
  text-decoration: none; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px;
}
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nav a:not(.btn) {
  display: flex; align-items: center; min-height: 44px; text-decoration: none;
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: var(--w-label);
  letter-spacing: var(--track-label); text-transform: var(--case-label); color: var(--ink);
}
.nav a:not(.btn):hover { text-decoration: underline; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; padding: 0 2px 0 12px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: var(--w-label);
  letter-spacing: var(--track-label); text-transform: var(--case-label);
}
.nav-toggle__bars { position: relative; width: 18px; height: 10px; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform .2s, top .2s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }
/* phone: the nav opens as a panel under the masthead */
.mast.is-open .nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--mast-bg); border-bottom: var(--rule-w) solid var(--rule);
  padding: var(--space-1) var(--gutter) var(--space-3);
}
.mast.is-open .nav li + li { border-top: var(--rule-w) solid var(--rule-soft); }
.mast.is-open .nav .btn { width: 100%; margin-top: var(--space-2); }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: block; }
  .nav ul { flex-direction: row; align-items: center; gap: var(--space-3); }
  .mast.is-open .nav { position: static; padding: 0; border: 0; }
  .mast.is-open .nav li + li { border-top: 0; }
  .mast.is-open .nav .btn { width: auto; margin-top: 0; }
}

/* ---------- photo tile ---------- */
.tile {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
  filter: var(--photo-filter);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-tile);
  background: var(--ink);
}

/* ---------- hero ---------- */
.hero { padding-block: var(--space-3) var(--space-4); }
.hero__grid { display: flex; flex-direction: column; gap: var(--space-4); }
.hero__text { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.hero__tile { order: 1; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 460px; } /* phone: the claim first, the photo after */
.hero__proof { margin: 0; padding-top: var(--space-2); border-top: var(--rule-w) solid var(--rule-soft); color: var(--ink-2); max-width: 36em; }
.hero__cta { margin-top: var(--space-1); }
@media (min-width: 768px) {
  .hero { padding-block: var(--space-5); }
  .hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-4); align-items: stretch; }
  .hero__tile { order: 0; max-width: none; }
}
@media (min-width: 1100px) {
  .hero { padding-block: var(--space-5); }
  .hero + .measure { padding-top: var(--space-5); }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); }
}

/* ---------- measure row ---------- */
.measure__head { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.measure__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.measure__item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.measure__item b {
  align-self: flex-start;
  font-family: var(--font-display); font-weight: var(--w-value); font-size: var(--fs-value);
  line-height: 1; letter-spacing: var(--track-display); color: var(--ink); max-width: 100%; /* long values (415 · 93%) wrap at the space on phones */
  background: var(--mark); border-radius: var(--radius-mark);
  padding: .06em .14em .04em; margin-left: -.14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.measure__item span { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
@media (min-width: 768px) { .measure__item span { font-size: 15px; } }
.measure__item small { display: block; margin-top: auto; padding-top: 4px; }
.measure__item--usage { display: none; }
.measure[data-usage-ok="true"] .measure__item--usage { display: flex; }
@media (min-width: 768px) {
  .measure__head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
  .measure__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .measure[data-usage-ok="true"] .measure__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- cards, offer rows, FAQ (used from Task 3 on) ---------- */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface); color: var(--ink);
  border: var(--rule-w) solid var(--rule); border-radius: var(--radius-tile);
  box-shadow: var(--shadow-card);
}
.row {
  display: grid; grid-template-columns: 1fr; gap: var(--space-1);
  padding-block: var(--space-3);
  border-top: var(--rule-w) solid var(--rule-soft);
}
.row > *, .card > * { margin: 0; }
.row:first-child { border-top-color: var(--rule); }
.row__price { font-family: var(--font-display); font-weight: var(--w-head); font-size: var(--fs-h2); letter-spacing: var(--track-head); white-space: nowrap; }
@media (min-width: 768px) { .row { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: var(--space-3); align-items: baseline; } .row__price { text-align: right; } }
.faq { border-top: var(--rule-w) solid var(--rule-soft); }
.faq:first-of-type { border-top-color: var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
  min-height: 56px; padding-block: var(--space-2); cursor: pointer; list-style: none;
  font-weight: 600; font-size: 18px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); font-weight: 400; font-size: 22px; line-height: 1; flex: none; }
.faq[open] summary::after { content: '\2212'; }
.faq > :not(summary) { margin: 0 0 var(--space-3); color: var(--ink-2); max-width: 40em; }

/* ---------- footer ---------- */
.foot { border-top: var(--rule-w) solid var(--rule); padding-block: var(--space-4) var(--space-5); }
.foot__grid { display: flex; flex-direction: column; gap: var(--space-3); }
.foot__mail { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-display); font-weight: var(--w-head); font-size: var(--fs-h2); letter-spacing: var(--track-head); text-decoration: none; color: var(--ink); align-self: flex-start; }
.foot__mail:hover { text-decoration: underline; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-3); }
.foot__links a { display: inline-flex; align-items: center; min-height: 44px; }
.foot__base { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); border-top: var(--rule-w) solid var(--rule-soft); }
@media (min-width: 768px) {
  .foot__grid { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .foot__base { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}
.foot .caption a { color: inherit; }

/* ---------- look switch ---------- */
.switch { display: flex; align-items: center; gap: var(--space-1); }
.switch:empty { display: none; }
.switch__label { margin-right: 4px; }
.switch button {
  min-height: 44px; padding: 0 14px; cursor: pointer;
  background: transparent; color: var(--ink);
  border: var(--rule-w) solid var(--rule-soft); border-radius: var(--radius-btn);
  font-family: var(--font-label); font-size: var(--fs-label); font-weight: var(--w-label);
  letter-spacing: var(--track-label); text-transform: var(--case-label);
}
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
