/* ==========================================================================
   Platy Pirates | FRC 9181 — shared stylesheet
   Design tokens live at the top. Change colors/fonts here and the whole
   site updates.
   ========================================================================== */

:root {
  /* --- Palette --- */
  --parchment: #f1e6cf;
  --parchment-dark: #e6d6b3;
  --burgundy: #6b1e2a;
  --burgundy-light: #8a2c3b;
  --maroon-deep: #3f0f1a;
  --gold: #c9a24b;
  --gold-light: #e0c377;
  --charcoal: #221d1b;
  --fog: #8c8478;
  --cream: #fffdf8;

  /* --- Type --- */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* --- Layout --- */
  --max-width: 1120px;
  --radius: 4px;
  --shadow-card: 0 6px 18px rgba(63, 15, 26, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--parchment);
  background-image:
    radial-gradient(rgba(63, 15, 26, 0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--maroon-deep);
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1em; }

a {
  color: var(--burgundy);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--maroon-deep); }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--burgundy);
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Header / nav — styled like a wooden plank sign                         */
/* ---------------------------------------------------------------------- */

.site-header {
  background: var(--maroon-deep);
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}

.brand img { width: 42px; height: 42px; display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cream);
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(201, 162, 75, 0.18);
  color: var(--gold-light);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 1rem;
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 8px;
  }
  .site-nav.open { display: flex; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; max-width: 260px; margin: 0 auto; }
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--charcoal);
  max-width: 46ch;
}

.hero-art img {
  width: 100%;
  max-width: 340px;
  filter: drop-shadow(var(--shadow-card));
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

@media (max-width: 860px) {
  .hero-actions { justify-content: center; }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--cream);
  border-color: var(--maroon-deep);
}
.btn-primary:hover { background: var(--maroon-deep); color: var(--cream); }

.btn-ghost {
  background: transparent;
  color: var(--maroon-deep);
  border-color: var(--maroon-deep);
}
.btn-ghost:hover { background: var(--maroon-deep); color: var(--cream); }

/* ---------------------------------------------------------------------- */
/* Wax seal — signature element                                           */
/* ---------------------------------------------------------------------- */

.wax-seal {
  --size: 128px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--burgundy-light), var(--burgundy) 55%, var(--maroon-deep) 100%);
  color: var(--gold-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: var(--shadow-card), inset 0 0 0 3px rgba(201, 162, 75, 0.55);
  text-align: center;
  flex-shrink: 0;
}

.wax-seal .num { font-size: 1.9rem; line-height: 1; }
.wax-seal .label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------- */
/* Rope divider                                                           */
/* ---------------------------------------------------------------------- */

.rope-divider {
  height: 18px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--gold) 0px, var(--gold) 6px,
    var(--maroon-deep) 6px, var(--maroon-deep) 12px
  );
  opacity: 0.7;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Sections & cards                                                        */
/* ---------------------------------------------------------------------- */

section { padding: 64px 0; }
section.alt { background: rgba(63, 15, 26, 0.05); }

.section-head { max-width: 62ch; margin-bottom: 36px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--cream);
  border: 1px solid rgba(63, 15, 26, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
}

/* torn-parchment edge accent on cards */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(120deg, var(--gold) 25%, transparent 25%, transparent 50%, var(--gold) 50%, var(--gold) 75%, transparent 75%);
  background-size: 16px 6px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card h3 { margin-bottom: 8px; }
.card .role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--burgundy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

.avatar-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: repeating-linear-gradient(45deg, var(--parchment-dark), var(--parchment-dark) 10px, var(--parchment) 10px, var(--parchment) 20px);
  border: 1px dashed var(--fog);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------------- */
/* Log entries (season history) — ship's log styling                      */
/* ---------------------------------------------------------------------- */

.log-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(63, 15, 26, 0.15);
}
.log-entry:last-child { border-bottom: none; }

.log-date {
  font-family: var(--font-mono);
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 620px) {
  .log-entry { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------------------------------------------------------------------- */
/* Sponsor tiers                                                          */
/* ---------------------------------------------------------------------- */

.sponsor-tier { margin-bottom: 40px; }
.sponsor-tier h3 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: var(--gold);
  background: var(--maroon-deep);
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius);
}

.sponsor-logo-slot {
  background: var(--cream);
  border: 1px dashed var(--fog);
  border-radius: var(--radius);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 8px;
}

/* ---------------------------------------------------------------------- */
/* Resources / doc list                                                   */
/* ---------------------------------------------------------------------- */

.resource-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--cream);
  border: 1px solid rgba(63, 15, 26, 0.12);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.resource-item .meta { color: var(--fog); font-family: var(--font-mono); font-size: 0.75rem; }
.resource-item a.btn { flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* Forms (Join / Contact)                                                  */
/* ---------------------------------------------------------------------- */

.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 700; font-size: 0.92rem; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1.5px solid var(--fog);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--charcoal);
}
.form-field textarea { min-height: 120px; resize: vertical; }

/* ---------------------------------------------------------------------- */
/* Social                                                                  */
/* ---------------------------------------------------------------------- */

.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.social-card {
  background: var(--cream);
  border: 1px solid rgba(63, 15, 26, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: var(--shadow-card);
}
.social-card .icon { font-size: 2.2rem; margin-bottom: 10px; display: block; }
.social-card strong { display: block; font-family: var(--font-display); color: var(--maroon-deep); font-size: 1.1rem; }
.social-card span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--fog); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--maroon-deep);
  color: var(--parchment);
  padding: 40px 0 28px;
  margin-top: 40px;
}
.site-footer a { color: var(--gold-light); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--gold-light); font-size: 0.95rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; font-size: 0.92rem; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(241, 230, 207, 0.2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fog);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Compass rose watermark, used sparingly */
.compass-mark {
  position: absolute;
  opacity: 0.06;
  width: 320px;
  height: 320px;
  right: -60px;
  top: -60px;
  pointer-events: none;
}
