/* =========================================================
   Amazed Labs — company site stylesheet
   Source of truth: tokens/tokens.css (do not edit values here
   without syncing tokens.json and tokens.css).
   ========================================================= */

@import url("../tokens/tokens.css");

/* ---------- Reset (small, opinionated) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
:focus-visible { outline: var(--al-stroke-focus) solid var(--al-accent-wonder); outline-offset: 2px; border-radius: 4px; }

/* ---------- Base ---------- */
html, body {
  background: var(--al-surface-canvas);
  color: var(--al-ink-primary);
}
body {
  font-family: var(--al-font-body);
  font-size: var(--al-body-m-size);
  line-height: var(--al-body-m-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--al-font-display);
  font-weight: 700;
  color: var(--al-ink-primary);
  margin: 0;
  letter-spacing: -0.3px;
}
h1 {
  font-size: var(--al-display-xl-size);
  line-height: var(--al-display-xl-lh);
  letter-spacing: var(--al-display-xl-tr);
  font-weight: 700;
}
h2 {
  font-size: var(--al-display-l-size);
  line-height: var(--al-display-l-lh);
  letter-spacing: var(--al-display-l-tr);
  margin-bottom: var(--al-space-4);
}
h3 {
  font-size: var(--al-display-m-size);
  line-height: var(--al-display-m-lh);
  letter-spacing: var(--al-display-m-tr);
  margin-bottom: var(--al-space-3);
}
h4 {
  font-size: var(--al-title-l-size);
  line-height: var(--al-title-l-lh);
  letter-spacing: var(--al-title-l-tr);
  margin-bottom: var(--al-space-2);
}

p { margin: 0 0 var(--al-space-3) 0; color: var(--al-ink-secondary); }
strong { color: var(--al-ink-primary); font-weight: 600; }
small { font-size: var(--al-body-s-size); }
a { color: var(--al-ink-primary); text-decoration: underline; text-decoration-color: var(--al-divider-strong); text-underline-offset: 4px; transition: text-decoration-color var(--al-motion-state) var(--al-ease-ink); }
a:hover, a:focus-visible { text-decoration-color: var(--al-accent-wonder); }

/* ---------- Layout primitives ---------- */
.al-container {
  width: 100%;
  max-width: var(--al-container-max);
  margin: 0 auto;
  padding: 0 var(--al-container-pad-mobile);
}
.al-container--narrow {
  max-width: var(--al-container-narrow-max);
}
@media (min-width: 768px) {
  .al-container { padding: 0 var(--al-container-pad); }
}

.al-section {
  padding: var(--al-space-14) 0;
}
@media (min-width: 768px) {
  .al-section { padding: var(--al-space-18) 0; }
}
.al-section--hero {
  padding-top: var(--al-space-10);
  padding-bottom: var(--al-space-14);
}
@media (min-width: 768px) {
  .al-section--hero {
    padding-top: var(--al-space-14);
    padding-bottom: var(--al-space-18);
  }
}

.al-eyebrow {
  font-family: var(--al-font-ui);
  font-size: var(--al-eyebrow-size);
  letter-spacing: var(--al-eyebrow-tr);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--al-ink-muted);
  margin-bottom: var(--al-space-3);
}

/* ---------- Skip link ---------- */
.al-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--al-ink-primary);
  color: var(--al-ink-inverse);
  padding: var(--al-space-2) var(--al-space-3);
  border-radius: var(--al-radius-sm);
  z-index: 999;
}
.al-skip:focus {
  left: var(--al-space-3);
  top: var(--al-space-3);
}

/* ---------- Site header / nav ---------- */
.al-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--al-divider-hairline);
}
.al-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--al-space-3) var(--al-container-pad-mobile);
  gap: var(--al-space-3);
}
@media (min-width: 768px) {
  .al-header__inner { padding: var(--al-space-3) var(--al-container-pad); }
}
.al-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--al-space-2);
  text-decoration: none;
  font-family: var(--al-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--al-ink-primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.al-brand img { width: 32px; height: 32px; }
.al-nav {
  display: flex;
  align-items: center;
  gap: var(--al-space-3);
}
.al-nav__link {
  display: none;
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
  color: var(--al-ink-secondary);
  text-decoration: none;
  padding: var(--al-space-2) 0;
  transition: color var(--al-motion-state) var(--al-ease-ink);
}
.al-nav__link:hover, .al-nav__link:focus-visible {
  color: var(--al-ink-primary);
}
@media (min-width: 768px) {
  .al-nav { gap: var(--al-space-5); }
  .al-nav__link { display: inline-flex; }
}
.al-nav__cta {
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
  font-weight: 600;
  color: var(--al-ink-inverse);
  background: var(--al-ink-primary);
  padding: var(--al-space-2) var(--al-space-4);
  border-radius: var(--al-radius-pill);
  text-decoration: none;
  transition: background var(--al-motion-state) var(--al-ease-ink), transform var(--al-motion-state) var(--al-ease-ink);
  min-height: var(--al-touch-min);
  display: inline-flex;
  align-items: center;
}
.al-nav__cta:hover, .al-nav__cta:focus-visible {
  background: #1d1810;
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.al-hero {
  display: grid;
  gap: var(--al-space-8);
  align-items: center;
}
@media (min-width: 1024px) {
  .al-hero { grid-template-columns: 1.1fr 1fr; gap: var(--al-space-12); }
}
.al-hero__copy h1 { margin-bottom: var(--al-space-4); }
.al-hero__copy h1 .al-mark-wonder {
  /* Wonder accent used as decorative emphasis only — italic + subtle underline rule.
     Color is kept off text to preserve WCAG AA contrast against cream canvas. */
  font-style: italic;
  background-image: linear-gradient(transparent 88%, var(--al-accent-wonder) 88%, var(--al-accent-wonder) 96%, transparent 96%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.04em;
}
.al-hero__lede {
  font-size: var(--al-body-l-size);
  line-height: var(--al-body-l-lh);
  color: var(--al-ink-secondary);
  max-width: 38ch;
  margin-bottom: var(--al-space-6);
}
.al-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--al-space-3);
}
.al-hero__art {
  border-radius: var(--al-radius-xl);
  overflow: hidden;
  background: var(--al-surface-canvas-warm);
  box-shadow: var(--al-elev-card);
  aspect-ratio: 4 / 3;
}
.al-hero__art img,
.al-hero__art svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Buttons ---------- */
.al-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--al-space-2);
  font-family: var(--al-font-ui);
  font-size: var(--al-body-m-size);
  font-weight: 600;
  min-height: var(--al-touch-min);
  padding: var(--al-space-3) var(--al-space-5);
  border-radius: var(--al-radius-pill);
  text-decoration: none;
  transition: transform var(--al-motion-state) var(--al-ease-ink),
              background var(--al-motion-state) var(--al-ease-ink),
              box-shadow var(--al-motion-state) var(--al-ease-ink);
  cursor: pointer;
  border: 1px solid transparent;
}
.al-btn:focus-visible {
  outline: var(--al-stroke-focus) solid var(--al-accent-wonder);
  outline-offset: 2px;
}
.al-btn--primary {
  background: var(--al-ink-primary);
  color: var(--al-ink-inverse);
}
.al-btn--primary:hover, .al-btn--primary:focus-visible {
  background: #1d1810;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(42, 36, 27, 0.18);
}
.al-btn--ghost {
  background: transparent;
  color: var(--al-ink-primary);
  border-color: var(--al-divider-strong);
}
.al-btn--ghost:hover, .al-btn--ghost:focus-visible {
  background: var(--al-surface-raised);
  transform: translateY(-1px);
}
.al-btn--wonder {
  background: var(--al-accent-wonder);
  color: var(--al-ink-primary);
}
.al-btn--wonder:hover, .al-btn--wonder:focus-visible {
  background: var(--al-accent-wonder-pressed);
  color: var(--al-ink-inverse);
  transform: translateY(-1px);
}

/* ---------- Founder story ---------- */
.al-story {
  display: grid;
  gap: var(--al-space-8);
  align-items: start;
}
@media (min-width: 1024px) {
  .al-story { grid-template-columns: 1fr 1.1fr; gap: var(--al-space-12); }
}
.al-story__art {
  border-radius: var(--al-radius-lg);
  overflow: hidden;
  background: var(--al-surface-canvas-warm);
  aspect-ratio: 3 / 2;
  box-shadow: var(--al-elev-card);
}
.al-story__art svg, .al-story__art img { width: 100%; height: 100%; object-fit: cover; }
.al-story__body p { font-size: var(--al-body-l-size); line-height: var(--al-body-l-lh); }
.al-story__sign {
  font-family: var(--al-font-display);
  font-size: var(--al-body-m-size);
  color: var(--al-ink-secondary);
  margin-top: var(--al-space-5);
}

/* ---------- Values grid ---------- */
.al-values {
  display: grid;
  gap: var(--al-space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: var(--al-space-8);
}
.al-value {
  background: var(--al-surface-panel);
  border: 1px solid var(--al-divider-subtle);
  border-radius: var(--al-radius-lg);
  padding: var(--al-space-5);
  transition: border-color var(--al-motion-state) var(--al-ease-ink), transform var(--al-motion-state) var(--al-ease-ink);
}
.al-value:hover, .al-value:focus-within {
  border-color: var(--al-divider-strong);
  transform: translateY(-2px);
}
.al-value__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--al-surface-canvas);
  border-radius: var(--al-radius-md);
  margin-bottom: var(--al-space-3);
}
.al-value h3 {
  font-size: var(--al-title-l-size);
  line-height: var(--al-title-l-lh);
  margin-bottom: var(--al-space-2);
}
.al-value p {
  margin: 0;
  font-size: var(--al-body-m-size);
  line-height: var(--al-body-m-lh);
}

/* ---------- Product cards ---------- */
.al-products {
  display: grid;
  gap: var(--al-space-5);
  margin-top: var(--al-space-8);
}
@media (min-width: 1024px) {
  .al-products { grid-template-columns: repeat(3, 1fr); }
}
.al-product {
  background: var(--al-surface-panel);
  border: 1px solid var(--al-divider-subtle);
  border-radius: var(--al-radius-lg);
  padding: var(--al-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--al-space-3);
  position: relative;
  overflow: hidden;
  transition: transform var(--al-motion-state) var(--al-ease-ink), box-shadow var(--al-motion-state) var(--al-ease-ink);
}
.al-product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
}
.al-product[data-product="tonoit"]::before        { background: var(--al-product-tono); }
.al-product[data-product="parentscript"]::before  { background: var(--al-product-parentscript); }
.al-product[data-product="tandempaws"]::before    { background: var(--al-product-tandempaws); }
.al-product:hover {
  transform: translateY(-3px);
  box-shadow: var(--al-elev-raised);
}
.al-product__mark {
  width: 64px;
  height: 64px;
  border-radius: var(--al-radius-md);
  margin-bottom: var(--al-space-2);
}
.al-product h3 {
  font-size: var(--al-display-m-size);
  font-family: var(--al-font-display);
  color: var(--al-ink-primary);
  /* Product-color underline reads the brand without compromising AA contrast. */
  border-bottom: 0; padding-bottom: 0;
}
.al-product[data-product="tonoit"] h3::after        { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--al-product-tono); margin-top: 8px; }
.al-product[data-product="parentscript"] h3::after  { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--al-product-parentscript); margin-top: 8px; }
.al-product[data-product="tandempaws"] h3::after    { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--al-product-tandempaws); margin-top: 8px; }
.al-product p { margin: 0; }
.al-product__boundary {
  padding-top: var(--al-space-3);
  border-top: 1px solid var(--al-divider-subtle);
  font-size: var(--al-body-s-size);
  line-height: 1.55;
  color: var(--al-ink-muted);
}
.al-product__bullets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--al-space-2);
  margin-top: var(--al-space-2);
}
.al-product__chip {
  font-family: var(--al-font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: var(--al-radius-pill);
  background: var(--al-surface-canvas);
  color: var(--al-ink-secondary);
  border: 1px solid var(--al-divider-subtle);
}
.al-product__link {
  margin-top: auto;
  padding-top: var(--al-space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--al-space-1);
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
  font-weight: 600;
  color: var(--al-ink-primary);
  text-decoration: none;
  border-bottom: 1.5px solid var(--al-accent-wonder);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: color var(--al-motion-state) var(--al-ease-ink), border-color var(--al-motion-state) var(--al-ease-ink);
}
.al-product__link:hover { color: var(--al-ink-primary); border-color: var(--al-accent-wonder-pressed); }

/* ---------- Pledge section ---------- */
.al-pledge {
  background: var(--al-surface-canvas-warm);
  border-radius: var(--al-radius-xl);
  padding: var(--al-space-10) var(--al-space-6);
  display: grid;
  gap: var(--al-space-6);
  align-items: center;
  margin-top: var(--al-space-8);
}
@media (min-width: 1024px) {
  .al-pledge { grid-template-columns: 200px 1fr; gap: var(--al-space-10); padding: var(--al-space-12) var(--al-space-10); }
}
.al-pledge__seal { width: 200px; height: 200px; }
.al-pledge h2 { margin-bottom: var(--al-space-4); }
.al-pledge__list {
  display: grid;
  gap: var(--al-space-3);
  margin-top: var(--al-space-3);
}
.al-pledge__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--al-space-3);
  padding: var(--al-space-3) 0;
  border-top: 1px solid var(--al-divider-subtle);
  align-items: baseline;
}
.al-pledge__item:first-child { border-top: 0; }
.al-pledge__item strong { font-family: var(--al-font-ui); font-size: var(--al-body-m-size); }
.al-pledge__item span { font-family: var(--al-font-ui); font-size: var(--al-body-s-size); color: var(--al-ink-muted); text-align: right; }
.al-pledge__note {
  margin-top: var(--al-space-5);
  padding: var(--al-space-3) var(--al-space-4);
  border-radius: var(--al-radius-md);
  background: var(--al-surface-canvas);
  border-left: 3px solid var(--al-accent-honey);
  font-size: var(--al-body-s-size);
  color: var(--al-ink-secondary);
}

/* ---------- Transparency note ---------- */
.al-transparency {
  background: var(--al-surface-panel);
  border: 1px solid var(--al-divider-subtle);
  border-radius: var(--al-radius-lg);
  padding: var(--al-space-6);
  margin-top: var(--al-space-6);
}
.al-transparency h3 { font-size: var(--al-title-l-size); margin-bottom: var(--al-space-3); }
.al-transparency p:last-child { margin-bottom: 0; }

/* ---------- Contact / footer ---------- */
.al-contact {
  display: grid;
  gap: var(--al-space-6);
  margin-top: var(--al-space-8);
}
@media (min-width: 768px) {
  .al-contact { grid-template-columns: 1.4fr 1fr; }
}
.al-contact__card {
  background: var(--al-surface-panel);
  border: 1px solid var(--al-divider-subtle);
  border-radius: var(--al-radius-lg);
  padding: var(--al-space-6);
}
.al-contact__list {
  display: grid;
  gap: var(--al-space-3);
  margin-top: var(--al-space-3);
}
.al-contact__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--al-space-3);
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
}
.al-contact__row strong { color: var(--al-ink-muted); font-weight: 500; }
.al-contact__row a { font-weight: 600; }
.al-contact__note {
  margin-top: var(--al-space-4);
  padding: var(--al-space-3) var(--al-space-4);
  border-left: 3px solid var(--al-accent-honey);
  background: var(--al-surface-canvas);
  font-size: var(--al-body-s-size);
}

.al-footer {
  margin-top: var(--al-space-18);
  padding: var(--al-space-10) 0 var(--al-space-12) 0;
  border-top: 1px solid var(--al-divider-subtle);
  background: var(--al-surface-canvas-warm);
}
.al-footer__grid {
  display: grid;
  gap: var(--al-space-6);
  margin-bottom: var(--al-space-6);
}
@media (min-width: 768px) {
  .al-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.al-footer h4 {
  font-family: var(--al-font-ui);
  font-size: var(--al-eyebrow-size);
  letter-spacing: var(--al-eyebrow-tr);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--al-ink-muted);
  margin-bottom: var(--al-space-3);
}
.al-footer ul { display: grid; gap: var(--al-space-2); }
.al-footer__tagline { margin-top: var(--al-space-3); max-width: 36ch; }
.al-footer a {
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
  color: var(--al-ink-secondary);
  text-decoration: none;
}
.al-footer a:hover, .al-footer a:focus-visible { color: var(--al-ink-primary); text-decoration: underline; text-decoration-color: var(--al-accent-wonder); }
.al-footer__fine {
  font-family: var(--al-font-ui);
  font-size: var(--al-body-s-size);
  color: var(--al-ink-muted);
  border-top: 1px solid var(--al-divider-subtle);
  padding-top: var(--al-space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--al-space-3);
}

/* ---------- Quote / pull ---------- */
.al-pull {
  font-family: var(--al-font-body);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--al-ink-secondary);
  border-left: 3px solid var(--al-accent-wonder);
  padding: var(--al-space-3) 0 var(--al-space-3) var(--al-space-5);
  margin: var(--al-space-6) 0;
}

/* ---------- Subtle motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .al-product, .al-value, .al-btn, .al-nav__cta {
    will-change: transform;
  }
}

/* ---------- Print ---------- */
@media print {
  .al-header, .al-footer { display: none; }
  body { background: white; color: black; }
  .al-product { break-inside: avoid; }
}
