/* The Flight SMP Hub — summer academy field guide.
   One accent idea: ember + dragon-scale teal on warm parchment. */

:root {
  --bg: #f7f1e4;
  --surface: #fffdf8;
  --ink: #2b2118;
  --ink-soft: #4a3f33;
  --muted: #6f6353;
  --line: #e3d6c0;
  --paper: #f2e8d7;
  --paper-deep: #f5ecdb;
  --ember: #bf5330;
  --ember-dark: #9c3f21;
  --teal: #2f6f66;
  --gold: #d99a3a;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(43, 33, 24, .06);
  --shadow-2: 0 8px 24px rgba(43, 33, 24, .08);
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--ember-dark); text-underline-offset: 2px; }
a:hover { color: var(--ember); }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  font-weight: 700;
}

h1 { font-size: clamp(28px, 5.2vw, 46px); }
h2 { font-size: clamp(22px, 3.4vw, 32px); }
h3 { font-size: 18px; }

p { margin: 0 0 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 50;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Header */
.site-head {
  background: rgba(247, 241, 228, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
}

.brand em { font-style: normal; color: var(--ember); }
.brand .gf-site-icon { display: block; border-radius: 6px; }

.site-nav { display: flex; gap: 16px; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a:hover { color: var(--ember); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdf8ec 0%, #f5ecda 100%);
}

.hero-scales {
  position: absolute;
  inset: 0;
  opacity: .55;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 100%,
      transparent 56%, rgba(191, 83, 48, .10) 57%,
      rgba(191, 83, 48, .10) 64%, transparent 65%);
  background-size: 46px 23px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 72%);
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 44px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ember-dark);
}


.lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ember);
  border-radius: 10px;
  background: var(--ember);
  color: #fff;
  font: 600 15px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ember-dark); border-color: var(--ember-dark); color: #fff; }
.btn:focus-visible { outline: 3px solid rgba(47, 111, 102, .55); outline-offset: 2px; }

.btn-ghost {
  background: transparent;
  color: var(--ember-dark);
}
.btn-ghost:hover { background: rgba(191, 83, 48, .08); color: var(--ember-dark); }

/* Quick facts */
.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  padding: 18px 20px;
  align-self: start;
}

.facts-title {
  font-size: 13px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 8px;
}

.facts-list { margin: 0; }

.facts-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.facts-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-list dt { color: var(--muted); flex: 0 0 auto; }
.facts-list dd { margin: 0; text-align: right; font-weight: 600; }

/* Sections */
.section {
  padding-top: 44px;
  padding-bottom: 44px;
}
.section + .section { border-top: 1px solid var(--line); }

.section-lede { color: var(--ink-soft); max-width: 74ch; margin-bottom: 18px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.section-head h2 { margin-bottom: 6px; }

.text-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(191, 83, 48, .35);
  white-space: nowrap;
}
.text-link:hover { border-bottom-color: var(--ember); }

/* Act track */
.act-track {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.act {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-1);
}
.act-two { border-left-color: var(--ember); }
.act-name { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.act-span { font-size: 14px; color: var(--muted); }
.act-state {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--teal);
}
.act-two .act-state { color: var(--ember); }

/* Cast cards */
.cast-grid {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.cast-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cast-card:hover { border-color: rgba(191, 83, 48, .5); box-shadow: var(--shadow-2); }

.cast-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.cast-name { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.2; }
.cast-creator { font-size: 13px; color: var(--muted); }
.cast-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}
.cast-dragon { font-weight: 600; }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--gold);
}
.chip-lupi::before { background: var(--teal); }
.chip-vulpes::before { background: var(--ember); }
.chip-feles::before { background: var(--gold); }

/* Timeline */
.timeline {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.tl-item {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: 2px solid var(--ink); }
.tl-when { display: flex; flex-direction: column; gap: 2px; }
.tl-date { font-weight: 600; font-size: 15px; }
.tl-day {
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.tl-body h3 { font-size: 19px; margin-bottom: 4px; }
.tl-source { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* Two-column prose */
.prose p { max-width: 72ch; }
.two-col { display: grid; gap: 0 36px; }
.two-col > * { min-width: 0; }

/* Watch steps */
.watch-grid { display: grid; gap: 12px; margin-top: 20px; }
.watch-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.watch-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.watch-step h3 { font-size: 17px; }
.watch-step p { margin-bottom: 0; font-size: 15px; }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 18px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.faq-item h3 { font-size: 16px; margin-bottom: 6px; }
.faq-item p { margin-bottom: 0; font-size: 15px; }

/* Page heads */
.page-head { padding-top: 40px; padding-bottom: 8px; }
.page-head h1 { max-width: 24ch; }

/* Dorms */
.dorm-row { display: grid; gap: 12px; margin-top: 20px; }
.dorm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dorm-lupi { border-top-color: var(--teal); }
.dorm-vulpes { border-top-color: var(--ember); }
.dorm-name { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.dorm-count { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.dorm-members { font-size: 14px; color: var(--ink-soft); }

/* Tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  min-width: 760px;
}

th, td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--paper-deep); }

.roster td:first-child { border-left: 3px solid transparent; }
.cell-name { font-family: var(--serif); font-size: 16px; font-weight: 700; }
.cell-creator strong { display: block; }
.cell-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.unknown { color: var(--muted); }
.table-note { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 78ch; }

.is-not td { width: 50%; }

/* Steps */
.steps { margin: 18px 0 0; padding-left: 22px; max-width: 78ch; }
.steps li { margin-bottom: 10px; }

/* Note block */
.note-block {
  background: rgba(255, 253, 248, .7);
  border-top: 1px solid var(--line);
  padding-bottom: 56px;
}
.note-block h2 { font-size: 22px; }
.note-block p { max-width: 78ch; }

/* Comments */
.comment-form { max-width: 620px; margin-top: 16px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid rgba(47, 111, 102, .45);
  outline-offset: 1px;
  border-color: var(--teal);
}
.form-msg { min-height: 20px; font-size: 13px; color: var(--teal); margin: 8px 0 0; }
.comments-list { margin-top: 24px; }
.comments-empty { color: var(--muted); font-size: 14px; }
.comment {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.comment-name { font-weight: 600; color: var(--ink); }
.comment-text { margin: 6px 0 0; }

/* Footer */
.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 32px 0 28px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-title { font-family: var(--serif); font-size: 18px; margin: 0 0 4px; }
.foot-legal { margin: 0; max-width: 48ch; font-size: 13px; color: rgba(242, 232, 215, .75); }
.foot-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-nav a { color: var(--paper); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: #fff; text-decoration: underline; }
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(242, 232, 215, .18);
  font-size: 12px;
  color: rgba(242, 232, 215, .75);
}

/* Responsive */
@media (min-width: 560px) {
  .cast-grid { grid-template-columns: repeat(2, 1fr); }
  .dorm-row { grid-template-columns: repeat(3, 1fr); }
  .watch-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 720px) {
  .act-track { grid-template-columns: 1fr 1fr; }
  .tl-item { grid-template-columns: 190px 1fr; gap: 24px; }
  .faq-list { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.3fr .9fr; gap: 44px; padding-top: 60px; padding-bottom: 56px; }
  .cast-grid { grid-template-columns: repeat(3, 1fr); }
  .section { padding-top: 56px; padding-bottom: 56px; }
}

/* Stacked tables on phones: no horizontal scrolling */
@media (max-width: 719px) {
  .table-scroll { border: 0; background: transparent; overflow: visible; box-shadow: none; border-radius: 0; }
  table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; font-size: 14px; }
  thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 14px 10px;
    box-shadow: var(--shadow-1);
  }
  tbody tr:hover { background: var(--surface); }
  tbody td {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0 16px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    border-left: 0;
    text-align: right;
  }
  tbody td:last-child { border-bottom: 0; }
  tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    padding-top: 2px;
  }
  tbody td:first-child {
    display: block;
    text-align: left;
    padding-top: 8px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
  }
  tbody td:first-child::before { content: none; }
  /* Secondary detail (announcement date, hatch note) gets its own line, right-aligned */
  tbody td .cell-sub {
    display: block;
    flex: 1 1 100%;
    text-align: right;
    margin-top: 2px;
  }
  .is-not td { width: auto; }
}
