/* ============================================================
   TEAM FORMULA STUDENT — design tokens & base
   Black editorial motorsport. Orbitron / Rajdhani / DM Sans.
   ============================================================ */

@font-face {
  font-family: "Trinos";
  src: url("fonts/Trinos.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --nav-h:     76px;
  --bg:        #0A0A0A;
  --surface:   #111111;
  --surface-2: #161616;
  --border:    #262626;
  --border-2:  #333333;
  --text:      #F4F4F4;
  --muted:     #9A9A9A;
  --muted-2:   #6E6E6E;
  --orange:    #FF6B00;
  --orange-dim:#C9560A;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 72px);

  --f-head: "Trinos", "Orbitron", sans-serif;
  --f-label: "Rajdhani", sans-serif;
  --f-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }
button { font-family: inherit; cursor: pointer; }

/* ---- type helpers ---- */
.head {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: uppercase;
}
/* Trinos display face is reserved for MAIN headings only
   (page titles + section titles). Everything else that reuses
   .head — stat numbers, card/member names, footer links, quotes,
   ghost watermarks — uses the Rajdhani workhorse above. */
h1.head, h2.head {
  font-family: var(--f-head);
}
.label {
  font-family: var(--f-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eyebrow {
  font-family: var(--f-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--orange);
}
.body { font-family: var(--f-body); }

/* ---- layout ---- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* section title w/ thick orange left border */
.sec-title {
  display: flex;
  align-items: center;
  gap: 18px;
}
.sec-title .bar {
  width: 6px;
  align-self: stretch;
  background: var(--orange);
  flex: 0 0 auto;
}
.sec-title h2 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.0;
  font-size: clamp(30px, 4.2vw, 54px);
  letter-spacing: 0;
}

/* ---- buttons ---- */
.btn {
  font-family: var(--f-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  padding: 15px 28px;
  white-space: nowrap;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%);
}
.btn-primary {
  background: var(--orange);
  color: #0A0A0A;
}
.btn-primary:hover { transform: translateY(-2px); background: #ff7d1f; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* orange bullet dot */
.dot {
  width: 9px; height: 9px;
  background: var(--orange);
  flex: 0 0 auto;
  margin-top: 8px;
}

/* divider */
.divider-orange {
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 30%, var(--border) 30%, var(--border) 100%);
  border: none;
}

/* card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
}

/* placeholder striped fill */
.ph {
  position: relative;
  background-color: #0e0e0e;
  background-image: repeating-linear-gradient(
    -45deg,
    #141414 0px, #141414 12px,
    #0e0e0e 12px, #0e0e0e 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a5a5a;
  padding: 4px 8px;
  text-align: center;
}

/* utility */
.uppercase { text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---- news / media table ---- */
.news-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "h1 h2 h3"
    "c1 c2 c3";
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.news-cell {
  background: var(--surface);
  padding: clamp(22px, 2.4vw, 32px);
}
.news-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: var(--surface-2);
}
.news-idx {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--orange);
}
.news-h { margin: 0; font-size: clamp(20px, 1.9vw, 26px); }

.news-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .15s ease;
}
.news-input::placeholder { color: var(--muted-2); }
.news-input:focus { outline: none; border-color: var(--orange); }

.news-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .15s ease;
}
.news-item:first-child { padding-top: 0; }
.news-item:hover { padding-left: 8px; }
.news-item-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 6px;
}
.news-item-title {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  transition: color .15s ease;
}
.news-item:hover .news-item-title { color: var(--orange); }

/* ---- event photo cards ---- */
.event-photo-link {
  display: block;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.event-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.event-photo-link:hover .event-photo {
  transform: scale(1.04);
}
.event-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 18px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.event-photo-link:hover .event-photo-overlay {
  opacity: 1;
}
.event-photo-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .news-table {
    grid-template-columns: 1fr;
    grid-template-areas:
      "h1" "c1"
      "h2" "c2"
      "h3" "c3";
  }
  .fs-explainer { grid-template-columns: 1fr !important; gap: 28px !important; }
  .judged-grid { grid-template-columns: 1fr 1fr !important; gap: 24px 16px !important; }
  .partner-grid { grid-template-columns: 1fr !important; }
  /* hero — mosaic stacks: text over a single image, collage hidden */
  .hero-mosaic { grid-template-columns: 1fr !important; }
  .hero-mosaic .hero-mosaic-grid { display: none !important; }
  .hero-mosaic .hero-mosaic-copy { border-right: none !important; }
  /* hero — filmstrip thumbnails hide on small screens */
  .hero-filmstrip { display: none !important; }
  /* team page — crew sections stack, member grid relaxes */
  .faculty-card { grid-template-columns: 1fr !important; text-align: center; gap: 18px !important; }
  .faculty-card img { width: 140px !important; height: 320px !important; margin: 0 auto; }
  .crew-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .crew-cards { grid-template-columns: repeat(3, 1fr) !important; }
}

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

/* ---- home feature cards ---- */
/* hero — filmstrip sprocket perforations */
.hero-filmstrip-perf {
  display: block;
  height: 6px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.28) 0 1.6px, transparent 2px);
  background-size: 14px 6px;
  background-repeat: repeat-x;
  background-position: center;
}
.feature-card .feature-arrow { transition: transform .15s ease; }
.feature-card:hover .feature-arrow { transform: translateX(4px); }

/* newsroom */
.news-feature .news-cta,.event-card .news-cta{transition:gap .15s ease}
.news-feature:hover,.event-card:hover{border-color:var(--pcard-accent, var(--orange))}
.news-feature:hover .news-cta,.event-card:hover .news-cta{gap:12px}
.event-card{min-height:220px}
@media (max-width:860px){.newsroom-grid-3{grid-template-columns:1fr !important}}
.moment-card .ph{border-bottom:1px solid var(--border)}
.moment-card a img{transition:transform .3s ease}
.moment-card a:hover img{transform:scale(1.04)}
.prospect-card{min-height:200px}
.prospect-card:hover{border-color:var(--pcard-accent, var(--orange))}
.prospect-card:hover .pcard-icon{border-color:var(--pcard-accent, var(--orange))}
.prospect-card:hover .pcard-icon svg{stroke:var(--pcard-accent, var(--orange))}

@media (max-width: 860px) {
  .hero-slide-rainsplash { object-position: 75% 45% !important; }
  /* above-the-fold relaxes and stacks on small screens */
  .home-hero-wrap { height: calc(100svh - var(--nav-h)) !important; min-height: 500px !important; }
  .home-fold > div:nth-child(2) { margin-top: 16px !important; }
  .feature-cards { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* partner CTA cards */
.partner-card .partner-link .arrow { transition: transform .15s ease; }
.partner-card:hover .partner-link { color: var(--orange); }
.partner-card:hover .partner-link .arrow { transform: translateX(4px); }

/* ============================================================
   OUR LEGACY — story / timeline
   ============================================================ */
.legacy-prologue { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.legacy-prologue .ghost-years {
  position: absolute; right: -30px; bottom: -60px; pointer-events: none; user-select: none;
  font-family: var(--f-head); font-weight: 700; line-height: 0.8;
  font-size: clamp(120px, 20vw, 300px); color: rgba(255,255,255,0.03); white-space: nowrap;
}
.legacy-lead {
  font-family: var(--f-body); font-weight: 400;
  font-size: clamp(18px, 2vw, 26px); line-height: 1.4;
  color: var(--text); max-width: 22ch; text-wrap: pretty; margin: 0;
}
.legacy-lead .accent { color: var(--orange); }
.legacy-sub {
  font-family: var(--f-body); font-size: clamp(14px, 1vw, 15px); line-height: 1.6;
  color: var(--muted); max-width: 46ch; text-wrap: pretty; margin: 0;
}
.legacy-figs { display: flex; flex-wrap: wrap; gap: clamp(20px, 3.5vw, 48px); }
.legacy-fig .n {
  font-family: var(--f-label); font-weight: 700; line-height: 1;
  font-size: clamp(30px, 3.5vw, 44px); color: var(--text); display: block;
}
.legacy-fig .n em { font-style: normal; color: var(--orange); }
.legacy-fig .l {
  font-family: var(--f-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 12px; color: var(--muted); margin-top: 8px; display: block;
}

/* act header */
.legacy-act-head { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.legacy-act-num {
  font-family: var(--f-label); font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; font-size: 13px; color: var(--orange); white-space: nowrap;
}
.legacy-act-title {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase; line-height: 0.92;
  font-size: clamp(38px, 6vw, 82px); margin: 0; letter-spacing: 0;
}
.legacy-act-intro {
  font-family: var(--f-body); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6;
  color: var(--muted); max-width: 40ch; text-wrap: pretty; margin: 0;
}

/* timeline */
.legacy-timeline { position: relative; }
.legacy-timeline::before {
  content: ""; position: absolute; left: 229px; top: 6px; bottom: 40px; width: 2px;
  background: var(--border-2);
}
.legacy-spine-fill { position: absolute; left: 229px; top: 6px; width: 2px; height: 0; background: var(--orange); z-index: 1; pointer-events: none; box-shadow: 0 0 10px color-mix(in srgb, var(--orange) 45%, transparent); }
.legacy-chapter {
  position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.legacy-chapter:last-child { padding-bottom: 0; }
.chapter-dot {
  position: absolute; left: 229px; transform: translateX(-50%); top: 6px;
  width: 15px; height: 15px; background: var(--surface);
  border: 2px solid var(--border-2); border-radius: 50%; z-index: 2;
  box-shadow: 0 0 0 3px var(--bg);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.legacy-chapter.lit .chapter-dot {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--bg), 0 0 16px 2px color-mix(in srgb, var(--orange) 40%, transparent);
}
.chapter-aside {
  position: sticky; top: calc(var(--nav-h) + 74px); align-self: start; text-align: right;
  padding-right: 64px; white-space: nowrap; z-index: 1;
}
.chapter-year {
  font-family: var(--f-head); font-weight: 700; line-height: 0.85;
  font-size: clamp(36px, 3.2vw, 48px); color: var(--muted); display: block;
  transition: color 0.4s;
}
.legacy-chapter.lit .chapter-year { color: var(--orange); }
.chapter-series {
  font-family: var(--f-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 12px; color: var(--muted); margin-top: 12px; display: block;
}
.chapter-main { padding-left: 96px; min-width: 0; }
.chapter-photo { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #0e0e0e; }
.chapter-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; display: block; transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
.legacy-chapter:hover .chapter-photo img { transform: scale(1.035); }
.chapter-photo .cap {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 18px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}
.chapter-event {
  font-family: var(--f-label); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: clamp(15px, 1.5vw, 20px); color: #fff; line-height: 1.1;
}
.chapter-venue {
  font-family: var(--f-body); font-size: 12px; color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em; white-space: nowrap; text-align: right;
}
.chapter-carline { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 26px 0 0; }
.chapter-car { font-family: "Orbitron", sans-serif; font-weight: 700; text-transform: uppercase; line-height: 0.9; font-size: clamp(30px, 3.6vw, 50px); margin: 0; }
.chapter-tag { font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--orange); }
.chapter-story {
  font-family: var(--f-body); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.55;
  color: var(--text); max-width: 54ch; text-wrap: pretty; margin: 18px 0 0;
}
.chapter-record {
  margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px;
}
.chapter-record li { display: flex; gap: 12px; align-items: flex-start; }
.chapter-record .body { font-size: 14px; line-height: 1.5; color: var(--muted); }
.chapter-record .tro { color: var(--orange); flex-shrink: 0; display: inline-flex; margin-top: 2px; }
.chapter-record li.win .body { color: var(--text); }

/* milestone flag */
.chapter-flag {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--orange) 55%, transparent);
  background: color-mix(in srgb, var(--orange) 9%, transparent); color: var(--orange);
  font-family: var(--f-label); font-weight: 700; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
}

/* year-jump rail */
.legacy-rail {
  position: fixed; right: 22px; top: 50%; z-index: 40;
  display: flex; flex-direction: column; gap: 7px; align-items: flex-end;
  transform: translateY(-50%) translateX(12px); opacity: 0; pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.legacy-rail.show { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.legacy-rail button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: none; border: none; padding: 2px 0; cursor: pointer; }
.legacy-rail .tick { width: 16px; height: 2px; background: var(--border-2); transition: background 0.25s, width 0.25s; }
.legacy-rail button.on .tick, .legacy-rail button:hover .tick { background: var(--orange); }
.legacy-rail button.on .tick { width: 26px; }
.legacy-rail .yr {
  font-family: var(--f-label); font-weight: 700; font-size: 10px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateX(4px); transition: opacity 0.25s, transform 0.25s, color 0.25s;
}
.legacy-rail button.on .yr, .legacy-rail button:hover .yr { opacity: 1; transform: none; }
.legacy-rail button.on .yr { color: var(--orange); }
@media (max-width: 1200px) { .legacy-rail { display: none; } }

/* finish flag — caps the timeline spine */
.legacy-finish { position: absolute; left: 229px; bottom: 40px; pointer-events: none; z-index: 2; }
.legacy-finish .pole { position: absolute; bottom: 0; left: 0; width: 2px; height: 28px; background: var(--border-2); }
.legacy-finish .flag {
  position: absolute; bottom: 23px; left: 2px; width: 26px; height: 17px;
  background-color: var(--muted); box-shadow: 0 0 0 1px var(--border-2);
  background-image:
    linear-gradient(45deg, var(--bg) 25%, transparent 25%, transparent 75%, var(--bg) 75%),
    linear-gradient(45deg, var(--bg) 25%, transparent 25%, transparent 75%, var(--bg) 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px;
}

/* epilogue */
.legacy-epilogue { border-top: 1px solid var(--border); background: var(--surface); }
.legacy-epi-title {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase; line-height: 0.95;
  font-size: clamp(26px, 3.5vw, 48px); margin: 0; letter-spacing: 0;
}

@media (max-width: 860px) {
  .legacy-timeline::before { left: 6px; }
  .legacy-spine-fill { left: 6px; }
  .legacy-finish { left: 6px; }
  .legacy-chapter { grid-template-columns: 1fr; padding-left: 32px; }
  .chapter-dot { left: 6px; top: 4px; }
  .chapter-aside { position: static; text-align: left; padding-right: 0; margin-bottom: 20px; display: flex; align-items: baseline; gap: 16px; }
  .chapter-series { margin-top: 0; }
  .chapter-main { padding-left: 0; }
  .chapter-record { grid-template-columns: 1fr; }
  .legacy-prologue-grid { grid-template-columns: 1fr !important; }
  .legacy-act-head { display: block !important; }
  .legacy-act-head .legacy-act-intro { margin-top: 20px; }
  .legacy-epi-grid { grid-template-columns: 1fr !important; align-items: start !important; }
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; }
::-webkit-scrollbar-thumb:hover { background: var(--orange-dim); }
