/* Page layout for iactribe.com. Colours, type and components come from tokens.css and components.css. */

/* Fonts: Bricolage Grotesque and Figtree are not loaded from Google. Until the woff2 files are
   added under /assets/fonts/ with @font-face rules here, the fallbacks in tokens.css render. */

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--plum); text-underline-offset: 3px; }
a:hover { color: var(--plum-hover); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--plum); color: var(--on-plum); padding: 10px 14px; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { left: 8px; color: var(--on-plum); }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 5vw, 64px); }
.muted { color: var(--mauve); }

@media (max-width: 640px) {
  .display-xl { font-size: 38px; }
  .display-lg { font-size: 30px; }
  .display-md { font-size: 24px; }
}

/* Header */
.site-header { padding-block: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 16px; }
.site-nav a:not(.iac-btn) { text-decoration: none; color: var(--mauve); padding-block: 10px; }
.site-nav a:not(.iac-btn):hover { color: var(--plum); }
.site-nav a[aria-current="page"] { color: var(--plum); font-weight: 600; box-shadow: inset 0 -3px 0 var(--marigold); }
.site-nav__cta { min-height: 44px; padding: 10px 18px; }
.site-nav .iac-btn--primary:hover { color: var(--on-plum); }

/* Page tops */
.hero { padding-block: 36px 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; }
.hero__aside { flex: 1 1 300px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.hero__main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero--page { padding-block: 48px 72px; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 22px; }
.hero h1 { max-width: 16em; }
.hero .lede { color: var(--mauve); max-width: 36em; }
.greeting { border-bottom: 5px solid var(--marigold); padding-bottom: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.iac-btn--primary:hover, .iac-btn--primary:focus { color: var(--on-plum); }
.iac-btn--accent:hover, .iac-btn--ghost:hover { color: var(--plum); }

/* The white sheet that holds the body of each page */
.sheet { background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: var(--space-9); }
.section { padding-top: var(--space-9); display: flex; flex-direction: column; gap: var(--space-6); }
.sheet > .section:first-child { padding-top: 72px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head h2 { max-width: 18em; }
.section-head p { font-size: 17px; color: var(--mauve); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-6); }
.point { display: flex; flex-direction: column; gap: var(--space-2); }
.point p, .rows span:last-child, .steps p { font-size: 16px; line-height: 1.55; color: var(--mauve); }

.card-lead { padding: var(--space-6); }
.card-lead .iac-card__title { font-size: 28px; }
.card-lead .iac-card__copy { font-size: 17px; max-width: 44em; }
.card-price { padding: var(--space-6); gap: var(--space-3); }
.card-price .iac-card__copy { font-size: 16px; }
.iac-card .iac-tag--quiet { background: var(--surface); }
.hero .iac-tag--quiet { background: var(--surface); }

.split { flex-direction: row; flex-wrap: wrap; gap: var(--space-6) var(--space-8); }
.split > .section-head { flex: 1 1 300px; }
.split > .rows { flex: 2 1 480px; min-width: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.rows li { padding: 18px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-1); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-wrap: wrap; gap: 6px var(--space-5); padding: 20px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); flex: 0 0 2.2em; font: 600 21px/1.3 var(--font-display); color: var(--mauve); }
.steps h3 { flex: 1 1 220px; }
.steps p { flex: 3 1 360px; }

.faq-wrap { max-width: 820px; }

/* Booking band and footer */
.book-band { background: var(--plum); color: var(--on-plum); }
.book-band__inner { padding-block: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6) 56px; }
.book-band__copy { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.book-band__copy .lede { max-width: 32em; }
.book-band__actions { flex: 1 1 280px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; font-size: 15px; }
.book-band a:not(.iac-btn) { color: var(--on-plum); }
.book-band :focus-visible { outline-color: var(--marigold); }

.site-footer { font-size: 14px; color: var(--mauve); }
.site-footer__inner { padding-block: var(--space-6); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px var(--space-6); }
.site-footer__mark { font-size: 18px; }
.site-footer__links { display: flex; gap: 20px; }
.site-footer a:not(.iac-wordmark) { color: var(--mauve); }

/* Booking page */
.booking { padding-block: 32px var(--space-9); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 56px; }
.booking__aside { flex: 1 1 300px; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.booking__aside .iac-dots { flex-direction: column; gap: 10px; }
.booking__panel { flex: 999 1 520px; min-width: 0; background: var(--surface); border-radius: var(--radius-xl); padding: clamp(20px, 4vw, 40px); }
.booking__step { display: flex; flex-direction: column; gap: var(--space-5); }
.booking__step h2:focus { outline: none; }
.booking__head { display: flex; flex-direction: column; gap: 6px; }
.booking__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.booking__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.booking__foot .iac-field__help { max-width: 30em; }
.booking__group { display: flex; flex-direction: column; gap: 10px; }
.booking__days { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.booking__done { align-items: flex-start; }
.booking__done p { font-size: 17px; color: var(--mauve); max-width: 34em; }
.iac-choices.iac-field--invalid .iac-choice span { border-color: var(--danger); }
.notice { padding: var(--space-4); border-radius: var(--radius-md); background: var(--blush); font-size: 16px; }
.notice--error { color: var(--danger); font-weight: 600; }

/* Plain text pages */
.prose { padding-block: 48px var(--space-9); max-width: 820px; display: flex; flex-direction: column; gap: var(--space-4); }
.prose h2 { margin-top: var(--space-5); }
.prose p, .prose li { color: var(--mauve); }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

/* A value still waiting on a real answer. `node build.mjs --strict` refuses to build while any remain. */
.todo { background: #ffe08a; color: #3d1f3a; padding: 0 .35em; border-radius: 4px; font-weight: 600; }

/* Hero portrait: a cutout with a transparent background, set on a brand colour. */
.iac-photo--lilac { background: var(--lilac); }

/* Logo: i, a, c in lowercase, each in its own circle, then "tribe". The registered name, I-AC Tribe, stays in the
   link's label and in the footer text. On page load the circles start as a triangle, the way the CIA triad
   (confidentiality, integrity, availability) is drawn, then flatten into the row. Hover or keyboard focus pulses
   them in turn. Nothing loops, and people who ask for reduced motion get the static logo.
   Distances are in units of the circle's own font size: circles are 1.9 wide and sit 1.68 apart. */
.iac-wordmark { gap: 0.3em; font-weight: 800; letter-spacing: -0.03em; }
.iac-wordmark__word { font-weight: 700; }
.iac-mark { display: inline-flex; align-items: center; padding-left: 0.13em; }
.iac-mark__l { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%;
  font-size: 0.58em; letter-spacing: 0; margin-left: -0.22em; }
.iac-mark__i { background: var(--plum); color: var(--on-plum); }
.iac-mark__a { background: var(--marigold); color: var(--plum); }
.iac-mark__c { background: var(--lilac); color: var(--plum); }

@media (prefers-reduced-motion: no-preference) {
  .iac-wordmark:not(.site-footer__mark) .iac-mark__i,
  .iac-wordmark:not(.site-footer__mark) .iac-mark__a { --open: iac-mark-from-base; }
  .iac-wordmark:not(.site-footer__mark) .iac-mark__c { --open: iac-mark-from-top; }
  .iac-mark__a { --pulse-delay: 0.12s; }
  .iac-mark__c { --pulse-delay: 0.24s; }

  .iac-mark__l {
    animation-name: var(--open, none);
    animation-duration: 1.5s;
    animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1);
    animation-fill-mode: backwards;
  }
  .iac-wordmark:not(.site-footer__mark) .iac-wordmark__word { animation: iac-word-in 1.5s ease-out backwards; }

  /* The opening animation stays first in the list, so hovering adds the pulse without replaying it. */
  .iac-wordmark:hover .iac-mark__l,
  .iac-wordmark:focus-visible .iac-mark__l {
    animation-name: var(--open, none), iac-mark-pulse;
    animation-duration: 1.5s, 0.45s;
    animation-delay: 0s, var(--pulse-delay, 0s);
    animation-timing-function: cubic-bezier(0.6, 0, 0.2, 1), ease-in-out;
  }
}

/* Corners of an equilateral triangle centred on the row: c on top, i bottom left, a bottom right. */
@keyframes iac-mark-from-base { 0%, 40% { transform: translate(0.84em, 0.485em); } 100% { transform: none; } }
@keyframes iac-mark-from-top { 0%, 40% { transform: translate(-1.68em, -0.97em); } 100% { transform: none; } }
@keyframes iac-word-in { 0%, 60% { opacity: 0; transform: translateX(-0.2em); } 100% { opacity: 1; transform: none; } }
@keyframes iac-mark-pulse { 50% { scale: 1.14; } }

/* The credential card is one link to the About page; the certificate number is styled as the visible link. */
a.iac-proof { color: var(--plum); text-decoration: none; transition: box-shadow 0.15s ease; }
a.iac-proof:hover, a.iac-proof:focus-visible { box-shadow: 0 0 0 2px var(--lilac); }
.iac-proof__link { color: var(--plum); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; }
a.iac-proof:hover .iac-proof__link { text-decoration-color: var(--plum); }
#credentials { scroll-margin-top: 24px; }
