/* Aartimora site components.
 *
 * The design-system tokens in tokens/ are the export, kept as-is so a re-export can
 * replace them. This file is ours: the repeated patterns lifted out of the exported
 * pages into real classes.
 *
 * The export expressed hover states with a `style-hover` attribute, which only its
 * preview runtime understood. Every one of them is a real :hover rule here instead
 * (ADR 0010). Page bodies still carry inline layout styles from the export; those
 * move into classes as pages are worked on, not in one sweep.
 */

/* -- Layout ------------------------------------------------------------- */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: var(--content-narrow); }

.section { padding: var(--section-y) 0; }
.section--tight { padding: var(--section-y-tight) 0; }
.section--warm  { background: var(--surface-warm); }
.section--tint  { background: var(--surface-petrol-tint); }
.section--brand { background: var(--petrol-800); }

.stack { display: flex; flex-direction: column; align-items: flex-start; }
.stack--1 { gap: var(--space-1); }
.stack--2 { gap: var(--space-2); }
.stack--3 { gap: var(--space-3); }
.stack--4 { gap: var(--space-4); }
.stack--6 { gap: var(--space-6); }

/* Two-column split used by every editorial section. Collapses on narrow screens. */
.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.split--text-first { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.split--image-wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.split--text-wide  { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }

@media (max-width: 860px) {
  .split, .split--text-first, .split--image-wide, .split--text-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Image-first splits read better with the text first once stacked. */
  .split--image-wide > .img-slot,
  .split--text-wide  > .img-slot { order: 2; }
}

/* -- Typography helpers ------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--petrol-600);
}
.eyebrow--rule::before {
  content: "";
  width: 24px;
  height: var(--rule-accent);
  background: var(--gold-400);
  flex: 0 0 auto;
}
.eyebrow--on-brand { color: var(--gold-300); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  background: var(--surface-petrol-tint);
  color: var(--petrol-700);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.lead { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--text-body); }
.measure { max-width: var(--measure); }
.rule-gold { width: 64px; height: var(--rule-accent); background: var(--gold-400); }

/* -- Buttons and links -------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-calm),
              border-color var(--dur-base) var(--ease-calm),
              color var(--dur-base) var(--ease-calm);
}
.btn--lg { min-height: 56px; padding: 16px 32px; font-size: var(--fs-body-lg); }

.btn--primary { background: var(--brand-interactive); color: var(--white); }
.btn--primary:hover { background: var(--petrol-700); color: var(--white); }

.btn--secondary { background: transparent; color: var(--brand-interactive); border-color: var(--petrol-300); }
.btn--secondary:hover { border-color: var(--petrol-600); color: var(--brand-interactive); }

/* On the petrol call-to-action band, where white is the loud colour. */
.btn--on-brand { background: var(--white); color: var(--petrol-900); }
.btn--on-brand:hover { background: var(--gold-300); color: var(--petrol-900); }

.link-arrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--fw-semibold);
  color: var(--brand-interactive);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm);
}
.link-arrow:hover { color: var(--petrol-700); transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .link-arrow:hover { transform: none; } }

/* -- Header ------------------------------------------------------------- */

.site-header { border-bottom: var(--border-hairline) solid var(--border-quiet); }
.site-header__bar {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.site-header__logo { flex: 0 0 auto; }
.site-header__logo img { height: 48px; width: auto; }
.site-nav { display: flex; gap: var(--space-4); margin-left: auto; align-items: center; flex-wrap: wrap; }

.nav-link {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-body);
  text-decoration: none;
  padding: 10px 2px;
  border-bottom: var(--rule-accent) solid transparent;
  transition: border-color var(--dur-base) var(--ease-calm);
}
.nav-link:hover { border-bottom-color: var(--gold-400); color: var(--text-body); }
.nav-link[aria-current="page"] { color: var(--petrol-800); border-bottom-color: var(--gold-400); }

@media (max-width: 860px) {
  .site-header__bar { min-height: 0; padding-top: var(--space-2); padding-bottom: var(--space-2); }
  .site-nav { margin-left: 0; gap: var(--space-2) var(--space-3); }
}

/* -- Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--surface-warm);
  border-top: var(--border-hairline) solid var(--border-quiet);
  padding: var(--space-8) 0 var(--space-4);
}
.site-footer__cols {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-1); }
.site-footer__heading {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--petrol-700);
}
.site-footer__link { font-size: var(--fs-body); color: var(--text-body); text-decoration: none; padding: 4px 0; }
.site-footer__link:hover { color: var(--text-link-hover); }
.site-footer__quiet { font-size: var(--fs-body); color: var(--text-quiet); padding: 4px 0; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--fs-small);
  color: var(--text-quiet);
}
.site-footer__legal a { color: var(--text-quiet); text-decoration: none; }
.hairline { height: 1px; background: var(--border-quiet); }

/* Keyboard users need a way past the navigation. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--white);
  color: var(--petrol-900);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* -- Photo slots -------------------------------------------------------- */
/* Placeholders from the export. Each one names the photo it is waiting for; the
   brief for the photographer lives in the markup until the real image lands. */

.img-slot {
  border-radius: var(--radius-image-soft);
  background: var(--petrol-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: var(--space-4);
}
.img-slot__id {
  font-size: var(--fs-label);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--petrol-500);
}
.img-slot__what {
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  color: var(--petrol-700);
  max-width: 28ch;
  font-weight: var(--fw-semibold);
}
.img-slot__spec { font-size: 13px; line-height: var(--lh-snug); color: var(--petrol-500); max-width: 28ch; }
.img-slot--bleed-left { margin-left: calc(var(--gutter) * -1); }
.img-slot--full { width: 100%; border-radius: 0; padding: var(--space-3); }
@media (max-width: 860px) { .img-slot--bleed-left { margin-left: 0; } }

/* -- Forms -------------------------------------------------------------- */

.field {
  min-height: 44px;
  padding: 10px var(--space-2);
  border-radius: var(--radius-input);
  border: 1px solid var(--ui-border);
  background: var(--surface-input);
  font-size: var(--fs-body);
  color: var(--text-body);
  font-family: var(--font-ui);
  max-width: 100%;
}
.field::placeholder { color: var(--text-quiet); }

.form-inline { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 260px; }
.form-inline .field { flex: 1; min-width: 180px; }

/* -- Reveal on scroll --------------------------------------------------- */
/*
 * Gated behind .js, which reveal.js sets on <html> before first paint. Without
 * JavaScript nothing is hidden. The export's version started every element at
 * opacity:0 unconditionally, so a crawler or a reader with scripts off saw a
 * blank page. Content first, animation second.
 */

.js .aa-reveal {
  opacity: 0;
  transform: translateY(var(--reveal-offset));
  transition: opacity var(--dur-reveal) var(--ease-calm), transform var(--dur-reveal) var(--ease-calm);
}
.js .aa-reveal.aa-in { opacity: 1; transform: translateY(0); }

.js .aa-img {
  opacity: 0;
  transform: scale(.97);
  transition: opacity var(--dur-reveal) var(--ease-calm), transform var(--dur-reveal) var(--ease-calm);
}
.js .aa-img.aa-in { opacity: 1; transform: scale(1); }

.js .aa-line { width: 0; transition: width var(--dur-slow) var(--ease-calm); }
.js .aa-line.aa-in { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .js .aa-reveal, .js .aa-img, .js .aa-line {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    width: 100% !important;
  }
}

/* -- Definition lists (practical details, contact details) --------------- */

.deflist { margin: 0; }
.deflist__row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-hairline) solid var(--border-quiet);
  align-items: baseline;
}
.deflist__row dt {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--petrol-700);
}
.deflist__row dd { margin: 0; font-size: var(--fs-body); color: var(--text-body); }
@media (max-width: 520px) {
  .deflist__row { grid-template-columns: 1fr; gap: var(--space-05); }
}

/* -- FAQ ---------------------------------------------------------------- */

.faq { border-top: var(--border-hairline) solid var(--border-quiet); }
.faq details { border-bottom: var(--border-hairline) solid var(--border-quiet); }
.faq summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  color: var(--petrol-900);
}
.faq summary > span:first-child { flex: 1; }
.faq p { margin: 0 0 var(--space-3); }

/*
 * The plus marker. The export masked it with an SVG fetched from unpkg.com, which
 * would have put an external CDN in the render path of every FAQ and handed each
 * visitor's IP address to it. Two pseudo-element bars cost nothing and never 404.
 */
.faq__marker {
  flex: 0 0 auto;
  position: relative;
  width: 20px;
  height: 20px;
  transition: transform var(--dur-base) var(--ease-calm);
}
.faq__marker::before,
.faq__marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--petrol-600);
  transform: translate(-50%, -50%);
}
.faq__marker::before { width: 14px; height: 2px; }
.faq__marker::after  { width: 2px;  height: 14px; }
details[open] .faq__marker { transform: rotate(45deg); }

details summary::-webkit-details-marker { display: none; }
details summary::marker { content: ""; }

/* -- Contact form ------------------------------------------------------- */

.form-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-warm);
  border-radius: var(--radius-card);
}
.form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--petrol-700);
}
.form-card textarea.field { resize: vertical; }

/* -- Pull quote --------------------------------------------------------- */

.pullquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-light);
  font-style: italic;
  line-height: var(--lh-snug);
  color: var(--petrol-800);
  max-width: none;
}

/* -- Card grids --------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.card-grid--wide { gap: var(--space-6) var(--space-4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card-topline {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) 0 0;
  border-top: var(--rule-accent) solid var(--gold-400);
}
.card-topline h3 { margin: 0; font-family: var(--font-ui); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--petrol-900); }
.card-topline p  { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); }

/* -- The three numbered steps ------------------------------------------- */

.steps { position: relative; display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps__track { position: absolute; top: 12px; left: 0; right: 0; height: var(--rule-accent); background: var(--border-quiet); z-index: 0; }
.steps__progress { position: absolute; top: 12px; left: 0; height: var(--rule-accent); background: var(--gold-400); z-index: 1; }
.step { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--space-2); }
.step__number {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-round);
  background: var(--white);
  border: var(--rule-accent) solid var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--petrol-800);
}
.step h3 { margin: 0; font-family: var(--font-ui); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--petrol-900); }
.step p  { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); }

/* -- The petrol call-to-action band ------------------------------------- */

.cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); }
.cta h2 { margin: 0; color: var(--white); max-width: 24ch; }
.cta p { margin: 0; font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--petrol-100); max-width: 52ch; }
.cta .btn { margin-top: var(--space-2); }
