/**
 * @file styles.css
 * @description Styles for the iapp.au landing page. Follows the Apple-style
 *              design spec supplied for the project: full-bleed tiles that
 *              alternate light and dark, one blue accent, pill buttons, tight
 *              display type, and no shadows or gradients on UI chrome.
 * @author AI Assistant
 * @date 2026-10-09
 */

/* ---------- Design tokens ---------- */
:root {
  /* The page is light-dominant by design; dark tiles supply the contrast. */
  color-scheme: light;

  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --ink-muted-80: #333333;
  /* Slightly darker than the spec's #7a7a7a so small text meets WCAG AA. */
  --ink-muted: #6e6e73;
  --body-muted-on-dark: #cccccc;
  --hairline: #e0e0e0;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --tile-dark: #272729;
  --black: #000000;

  /* SF Pro on Apple devices, Inter (the closest open equivalent) elsewhere. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;

  --radius-lg: 18px;
  --radius-pill: 9999px;

  --wrap: 980px;
  --wrap-wide: 1200px;
  --gutter: 24px;
  --section: 80px;
  --nav-height: 44px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: -0.28px;
}

h2 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: 0;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-wide {
  max-width: var(--wrap-wide);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 52px;
  padding: 8px 15px;
  background: var(--canvas);
  border-radius: 8px;
  z-index: 20;
}

.skip-link:focus {
  left: 8px;
}

/* ---------- Global nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--black);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.12px;
}

.nav-list a {
  display: inline-block;
  padding-block: 16px;
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Tiles (full-bleed sections) ---------- */
.tile {
  padding-block: var(--section);
  text-align: center;
  /* Keeps anchored sections clear of the sticky nav. */
  scroll-margin-top: var(--nav-height);
}

.tile-parchment {
  background: var(--parchment);
}

.tile-dark {
  background: var(--tile-dark);
  color: #ffffff;
}

.lead {
  max-width: 720px;
  margin: 12px auto 0;
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: 0.196px;
  text-wrap: balance;
}

.intro {
  max-width: 640px;
  margin: 17px auto 0;
}

.tile-dark .intro {
  color: var(--body-muted-on-dark);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 112px 104px;
}

.hero h1 {
  max-width: 14em;
  margin-inline: auto;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  font-size: 17px;
  line-height: 1.24;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.button:active {
  transform: scale(0.95);
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-secondary {
  background: transparent;
  color: var(--primary);
}

/* ---------- Project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  text-align: left;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}

.status-live {
  color: var(--ink);
  font-weight: 600;
}

.card h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.card-link {
  margin-top: auto;
  padding-top: 8px;
}

.card-link.is-pending {
  color: var(--ink-muted);
}

/* ---------- Commitments ---------- */
.promises {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
  text-align: left;
}

.promises h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.promises p {
  margin-top: 8px;
  color: var(--body-muted-on-dark);
}

/* ---------- About ---------- */
.about-body {
  display: grid;
  gap: 17px;
  max-width: 640px;
  margin: 24px auto 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--parchment);
  color: var(--ink-muted-80);
  font-size: 12px;
  letter-spacing: -0.12px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 32px;
}

.site-footer a {
  color: inherit;
}

/* ---------- 404 page ---------- */
.not-found {
  min-height: 80vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 17px;
  padding: var(--gutter);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  h1 {
    font-size: 40px;
  }

  .promises {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 833px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 21px;
    line-height: 1.19;
  }

  .hero {
    padding-block: 72px 64px;
  }

  .cards,
  .promises {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 419px) {
  :root {
    --section: 48px;
    --gutter: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .nav-list {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
