/* pages/content.css: The Pack, product pages, services, about, contact, legal. */

/* Product tones: the field color, its text-safe ink, and the text that sits on each (BRAND.md 3). */
.tone-yellow { --tone: var(--field-yellow); --tone-ink: var(--yellow-ink); --on-tone: var(--on-field-dark); }
.tone-red { --tone: var(--field-red); --tone-ink: var(--red-ink); --on-tone: var(--on-field-light); }
.tone-orange { --tone: var(--field-orange); --tone-ink: var(--orange-ink); --on-tone: var(--on-field-dark); }
.tone-green { --tone: var(--field-green); --tone-ink: var(--green-ink); --on-tone: var(--on-field-dark); }
.tone-violet { --tone: var(--field-violet); --tone-ink: var(--violet-ink); --on-tone: var(--on-field-light); }
.tone-blue { --tone: var(--field-blue); --tone-ink: var(--blue-ink); --on-tone: var(--on-field-light); }

:root { --on-tone-ink: #FFFFFF; }
:root[data-theme="dark"] { --on-tone-ink: #0B1640; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --on-tone-ink: #0B1640; }
}

.button-tone { background: var(--tone-ink); color: var(--on-tone-ink); }
.button-tone:hover { background: var(--text); color: var(--canvas); }

.pill-tone { background: var(--tone); color: var(--on-tone); }
/* Small text never sits on bright red (3.9:1): red pills and the red sign-off use the text-safe ink. */
.tone-red .pill-tone { background: var(--tone-ink); color: var(--on-tone-ink); }
.tone-red .product-sign { background: var(--tone-ink); color: var(--on-tone-ink); }
.chip-tone { color: var(--text); border-color: var(--rule); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  border: 1.5px solid var(--tone-ink);
  color: var(--tone-ink);
  font-weight: 600;
  font-size: var(--small-size);
  line-height: 1;
}

/* Glyphs */
.glyph { width: 100%; height: 100%; }
.glyph-lines { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.glyph-dot { fill: currentColor; stroke: none; }

/* Section heads */
.section-head { margin-bottom: var(--s-7); }
.section-head .lead { margin-top: var(--s-4); }

/* The Pack */
.pack-list { display: grid; gap: var(--s-5); }

.pack-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-5);
  padding: var(--s-5);
  border-radius: var(--r-xl);
  background: var(--tone);
  color: var(--on-tone);
}

.pack-head {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-4) var(--s-3) var(--s-3);
}

.pack-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--h2-size);
  line-height: var(--h2-lh);
  letter-spacing: -0.01em;
}

.pack-head { container-type: inline-size; }
.pack-name-fit { font-size: min(var(--h2-size), 17cqi); }

.pack-glyph { display: block; width: 132px; height: 132px; }

.pack-inset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--canvas);
  color: var(--text);
}

.pack-inset .pill-tone { background: var(--surface); color: var(--text); }

.pack-tagline {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--h3-size);
  line-height: var(--h3-lh);
}

.pack-features {
  display: grid;
  gap: var(--s-1);
  margin-bottom: var(--s-2);
  padding-left: 1.1em;
  color: var(--text-2);
}
.pack-features li::marker { color: var(--tone-ink); }

/* A lab project's disclaimer takes the place of the feature list: plain secondary text, no box. */
.pack-disclaimer {
  max-width: 34em;
  margin-bottom: var(--s-2);
  color: var(--text-2);
}

/* From the lab: its own group after The Pack */
.lab-group { margin-top: var(--s-8); }

@media (max-width: 900px) {
  .pack-panel { grid-template-columns: minmax(0, 1fr); padding: var(--s-4); }
  .pack-head { flex-direction: row; align-items: center; padding: var(--s-3) var(--s-2) 0; }
  .pack-glyph { width: 72px; height: 72px; flex: none; }
  .pack-inset { padding: var(--s-5); }
}

/* Product pages */
.product-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
  padding-block: var(--s-8) var(--s-7);
}

.product-hero-copy { grid-column: 1 / span 7; }

.product-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--display-size);
  line-height: var(--display-lh);
  letter-spacing: var(--display-track);
}

.product-endorse { margin-top: var(--s-4); font-size: var(--lead-size); color: var(--text-2); }
.product-endorse .endorse-mark { width: 1.1em; height: 1.1em; }

.product-tagline { margin-top: var(--s-6); max-width: 30em; color: var(--text); }

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-6);
  padding: 0;
  list-style: none;
}

.product-price { margin-top: var(--s-4); font-weight: 600; }

.product-stores { margin-top: var(--s-6); }

.product-field {
  grid-column: 8 / span 5;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 18%;
  border-radius: var(--r-xl);
  background: var(--tone);
  color: var(--on-tone);
}

.notice {
  max-width: none;
  margin-bottom: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border-left: 6px solid var(--tone-ink);
  font-weight: 600;
}

.product-section { padding-block: var(--s-7); }
.product-section > h2 { margin-bottom: var(--s-6); }

.product-summary {
  font-size: var(--lead-size);
  line-height: var(--lead-lh);
  max-width: 40em;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-7) var(--s-7);
  padding: 0;
  list-style: none;
}

.feature { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.feature-title { font-size: 22px; }
.feature-body { color: var(--text-2); }

.fine-list { display: grid; gap: var(--s-3); padding-left: 1.2em; color: var(--text-2); }

.product-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-7);
}

.product-sign {
  flex: 1;
  padding: var(--s-6);
  border-radius: var(--r-xl);
  background: var(--tone);
  color: var(--on-tone);
}
.product-sign-name { font-family: var(--font-display); font-weight: 700; font-size: var(--h3-size); line-height: 1.1; }
.product-sign .endorse { margin-top: var(--s-2); font-size: 17px; }
.product-sign .tk-arm { stroke: currentColor; }
.product-sign .tk-dot { fill: currentColor; }
.product-sign-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 900px) {
  .product-hero { padding-block: var(--s-6) var(--s-5); row-gap: var(--s-6); }
  .product-hero-copy { grid-column: 1 / -1; }
  .product-field { grid-column: 1 / -1; grid-row: 1; aspect-ratio: auto; height: 180px; padding: var(--s-5); }
  .product-field .glyph { width: 140px; }
  .feature-list { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

/* Legal and support */
.legal { padding-block: var(--s-7) 0; }
.crumb { margin-bottom: var(--s-6); font-weight: 600; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-next { margin-top: var(--s-7); }
.support-intro { margin-top: var(--s-5); }
.support-actions { margin-top: var(--s-6); }
.faq { margin-top: var(--s-8); display: grid; gap: var(--s-6); max-width: var(--measure); }
.faq-item { padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.faq-q { font-size: 22px; }
.faq-a { margin-top: var(--s-2); color: var(--text-2); }

/* Services */
.service-list { display: grid; }

.service {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-7);
  padding-block: var(--s-7);
  border-top: 1px solid var(--rule);
}

.service-title { font-size: var(--h2-size); }
.service-summary { margin-top: var(--s-4); font-size: var(--lead-size); line-height: var(--lead-lh); color: var(--text-2); }
.service-link { margin-top: var(--s-4); }

.service-points {
  display: grid;
  align-content: start;
  gap: var(--s-3);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  list-style: none;
}
.service-points li { padding-left: var(--s-5); position: relative; }
.service-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--link);
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  margin-top: var(--s-7);
  padding: var(--s-7);
  border-radius: var(--r-xl);
  background: var(--tint);
}
.cta-title { font-size: var(--h2-size); max-width: 14em; }
.cta-lead { margin-top: var(--s-3); max-width: 36em; color: var(--text-2); }

@media (max-width: 900px) {
  .service { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .cta-band { padding: var(--s-6); }
}

/* About */
.about-title { max-width: 12em; font-size: var(--display-size); line-height: var(--display-lh); font-weight: 800; letter-spacing: var(--display-track); }
.about-intro { display: grid; gap: var(--s-5); max-width: var(--measure); }
.about-lead { color: var(--text); }

.about-name { max-width: var(--measure); margin-top: var(--s-6); color: var(--text-2); }

.how { margin-top: var(--s-8); }
.how-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-7);
  margin-top: var(--s-6);
  padding: 0;
  list-style: none;
}
.how-list li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--h3-size);
  line-height: var(--h3-lh);
}

@media (max-width: 900px) {
  .how-list { grid-template-columns: minmax(0, 1fr); }
}

/* Contact */
.address-list { display: grid; gap: var(--s-4); padding: 0; list-style: none; max-width: 40em; }
.address {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  max-width: none;
}
.address-label { color: var(--text-2); font-weight: 600; }
.address-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-7);
  align-items: start;
}
.contact-form-title { font-family: var(--font-body); font-weight: 800; font-size: var(--h3-size); line-height: var(--h3-lh); margin-bottom: var(--s-5); }
.contact-form { display: grid; gap: var(--s-5); padding: var(--s-6); border-radius: var(--r-xl); background: var(--surface); }
.contact-form .button { justify-self: start; }
.field { display: grid; gap: var(--s-2); }
.field-label { font-weight: 600; }
.field-input {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--canvas);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field-input:hover { border-color: var(--text-2); }
.field-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--link); }
.field-input[aria-invalid="true"] { border-color: var(--red-ink); }
.field-textarea { resize: vertical; min-height: 160px; }
.field-error { color: var(--red-ink); font-weight: 600; font-size: var(--small-size); }
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
  margin-bottom: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  border-left: 6px solid var(--red-ink);
  background: var(--surface);
  font-weight: 600;
  max-width: none;
}
.form-alert-list { display: grid; gap: var(--s-1); padding-left: 1.1em; }
.form-alert-list a { color: var(--text); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-form { padding: var(--s-5); }
}

/* Error pages: the one centered layout besides the stacked lockup (BRAND.md 5) */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: var(--s-9) var(--s-7);
}
.error-mark { width: 96px; height: 96px; margin-bottom: var(--s-6); }
.error-title { font-size: var(--display-size); line-height: var(--display-lh); font-weight: 800; letter-spacing: var(--display-track); max-width: 10em; }
.error-body { margin-top: var(--s-5); margin-inline: auto; }
.error-actions { justify-content: center; margin-top: var(--s-7); }
