/* ==========================================================================
   angelagorden.com — site stylesheet
   Source of truth: design-ref/design-site.md
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #F9F5F1;
  --ink: #1C1A15;
  --ink-60: #6B675E;
  --rule: #D8CEC4;
  --card: rgba(255, 253, 246, .6);
  --white: #FFFFFF;
  --kraft: #EFE9E0;

  --cyan-deep: #17393F;
  --cyan: #1E6B78;
  --cyan-tint: #D9E7E9;

  --berry: #8A1F4C;
  --berry-tint: #F3E6EB;

  --green: #3A7A57;
  --green-text: #2F6848;
  --green-fill: #DFEBE2;
  --clay: #A4553F;
  --clay-fill: #F2E2DC;

  --hairline: rgba(28, 26, 21, .45);
  --card-border: rgba(28, 26, 21, .4);
  --panel-hover: #F0EDE9;

  --radius-card: 22px;
  --radius-panel: 32px;
  --radius-paper: 4px;
  --radius-pill: 999px;

  --page-max: 1160px;
  --section-gap: 72px;
  --grid-gap: 24px;

  --serif: Lora, Georgia, "Times New Roman", serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --deboss: 0 1px 0 rgba(255, 255, 255, .75), 0 -1px 0 rgba(28, 26, 21, .28);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;

  /* Paper texture: six prime-sized tiles so the repeat never lines up.
     Every fleck stays under .25 alpha to keep body text AA. */
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 17px 23px, rgba(122, 92, 52, .22) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 71px 9px, rgba(122, 92, 52, .16) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 43px 88px, rgba(60, 48, 36, .14) 0 .7px, transparent 1.3px),
    radial-gradient(ellipse 5px 1px at 96px 51px, rgba(122, 92, 52, .2) 0 60%, transparent 100%),
    radial-gradient(ellipse 1px 4px at 29px 131px, rgba(30, 107, 120, .18) 0 60%, transparent 100%),
    radial-gradient(circle at 150px 70px, rgba(255, 255, 255, .55) 0 1.2px, transparent 2px);
  background-size: 113px 127px, 167px 149px, 131px 173px, 199px 157px, 223px 211px, 181px 193px;
}

h1, h2, h3, p, blockquote, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-underline-offset: 4px; }
a:hover { color: var(--cyan); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border-radius: var(--radius-paper);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- 3. Layout ---------- */
.site { container-type: inline-size; min-height: 100vh; }

.wrap {
  /* page-max is the content width; side padding sits outside it. */
  box-sizing: content-box;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 16px clamp(20px, 4cqi, 48px) 0;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

main {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* ---------- 4. Type roles ---------- */
.deboss { text-shadow: var(--deboss); }

.eyebrow {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.label {
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.meta {
  font-size: 13.5px;
  color: var(--ink-60);
}

.hl {
  font-style: italic;
  font-weight: 600;
  color: var(--berry);
}

/* ---------- 5. Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 28px;
  border-bottom: 1px solid var(--hairline);
}

.site-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 16px 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 16px 0;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--cyan);
}

/* ---------- 6. Page intro ---------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro h1 {
  max-width: 15em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5cqi, 62px);
  line-height: 1.1;
  letter-spacing: -.012em;
  text-wrap: balance;
}

.intro-line {
  max-width: 30em;
  font-size: clamp(18px, 1.7cqi, 20px);
}

/* ---------- 7. Section heading ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 3cqi, 34px);
  line-height: 1.15;
}

.section-note {
  font-size: 15px;
  color: var(--ink-60);
}

/* ---------- 8. Project cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
  gap: var(--grid-gap);
}

/* Cards in a row share a height (grid stretch). Inside, label, title, and
   snapshot keep a fixed gap; the footer is pinned to the bottom. */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card);
}

.card-art {
  position: relative;
  padding: 26px 56px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.card-art svg { width: 100%; height: auto; }

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 14px;
}

.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  text-wrap: balance;
}

.card-snap {
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.card-foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15.5px;
}

/* Public projects with no destination yet: same words, not a link. */
.card-link--pending {
  color: var(--ink-60);
}

.card:hover,
.card:focus-within { border-color: var(--ink); }

.card:hover .card-art,
.card:focus-within .card-art { background: var(--panel-hover); }

/* Yarn tail */
.yarn-tail {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.card:hover .yarn-tail,
.card-link:focus-visible .yarn-tail { transform: translateX(7px); }

@media (prefers-reduced-motion: no-preference) {
  .card, .card-art { transition: background-color .25s, border-color .25s; }
  .yarn-tail { transition: transform .25s; }
}

/* ---------- 9. Access tags ---------- */
.tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tag--gated { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.tag--live { border: 1px solid var(--cyan); background: var(--cyan); color: var(--paper); }
.tag--public { border: 1px dashed var(--ink); background: var(--paper); color: var(--ink); }

/* ---------- 10. Game panel (placeholder until the game spec lands) ---------- */
.game-panel {
  container-type: inline-size;
  min-height: 728px; /* the game's measured height in the desktop mockup */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(22px, 4.5cqi, 56px);
  border-radius: var(--radius-panel);
  background: var(--cyan-deep);
  color: var(--white);
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border: 1.5px solid var(--cyan-tint);
  border-radius: var(--radius-pill);
  color: var(--cyan-tint);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.game-soon {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}

.game-panel :focus-visible { outline-width: 3px; outline-color: var(--cyan-tint); }

/* ---------- 11. About ---------- */
.about-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 72px;
}

.about-intro .intro { flex: 1 1 480px; }
.about-intro .intro-line { max-width: 34em; }
.about-intro .body { max-width: 36em; }
.about-intro .label { line-height: 1.7; }

/* The one arch on the site. Shown as provided: no border, no rotation. */
.about-photo { flex: 0 1 300px; }
.about-photo img { width: 100%; height: auto; }

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--grid-gap);
}

/* Company first, then role, then description, with fixed gaps.
   Cards in a row share a height (grid stretch). */
.place {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card);
}

.place h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.2;
}

.place-role {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-60);
}

.place p:last-child { font-size: 16px; line-height: 1.55; }

.pov {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 72px;
}

.pov-lede {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pov-lede h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4cqi, 48px);
  line-height: 1.1;
  text-wrap: balance;
}

.pov-lede p:last-child { max-width: 30em; }

.pov-card {
  flex: 1.4 1 480px;
  min-width: 0;
  padding: 22px 26px 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card);
}

.pov-table { width: 100%; border-collapse: collapse; }

.pov-table thead tr,
.pov-table tbody tr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}

.pov-table thead tr { padding-bottom: 12px; }
.pov-table tbody tr { padding: 16px 0; border-top: 1px solid var(--rule); }

.pov-table th,
.pov-table td { padding: 0; text-align: left; }

.pov-table .was { flex: 1 1 230px; }
.pov-table .now { flex: 1.3 1 280px; }

.pov-table th.now { color: var(--cyan); }

.pov-table td.was {
  font-size: 17px;
  color: var(--ink-60);
}

.pov-table td.now {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
}

.pov-table td.now .arrow {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--cyan);
}

/* ---------- 12. Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 48px;
  padding: 40px 0 56px;
  border-top: 1px solid var(--hairline);
}

.site-footer h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 34px;
  line-height: 1.2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  font-weight: 500;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
