/* Aggie Cloud Engineering Society — Texas A&M themed styles */
:root {
  --maroon: #500000;
  --maroon-dark: #3c0000;
  --maroon-light: #732f2f;
  --white: #ffffff;
  --offwhite: #f6f4ef;
  --gray: #707373;
  --gray-light: #d1d1d1;
  --charcoal: #332c2c;
  --gold: #d6d3c4;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(60, 0, 0, 0.12);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--charcoal);
  background: var(--offwhite);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  color: var(--maroon);
  line-height: 1.2;
  letter-spacing: 0.5px;
}

a { color: var(--maroon); }
a:hover { color: var(--maroon-light); }
img { max-width: 100%; display: block; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--white); color: var(--maroon); padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; }

/* ---------- Header / nav ---------- */
.top-bar {
  background: var(--maroon-dark);
  color: var(--gold);
  font-size: .8rem;
  text-align: center;
  padding: .35rem 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-header {
  background: var(--maroon);
  color: var(--white);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 1.25rem; letter-spacing: 1px; }
.brand-text span { font-size: .75rem; color: var(--gold); letter-spacing: .5px; }

.nav-links { list-style: none; display: flex; gap: .25rem; }
.nav-links a {
  color: var(--white); text-decoration: none; padding: .55rem .85rem;
  border-radius: 6px; font-weight: 600; font-size: .95rem; display: block;
}
.nav-links a:hover, .nav-links a:focus-visible { background: var(--maroon-light); }
.nav-links a[aria-current="page"] { background: var(--white); color: var(--maroon); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--white); color: var(--white);
  border-radius: 6px; padding: .35rem .7rem; font-size: 1.2rem; cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--maroon); padding: .5rem 1.25rem 1rem;
    box-shadow: 0 8px 12px rgba(0,0,0,.2);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding: 4rem 0 3.5rem; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3.3rem); text-transform: uppercase; }
.hero p.lead { font-size: 1.15rem; margin: 1rem 0 1.75rem; color: #f1e7e7; max-width: 38ch; }
.hero .eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 3px; font-size: .85rem; font-weight: 700; }
.hero-art { filter: drop-shadow(0 10px 25px rgba(0,0,0,.35)); }

.page-hero { background: var(--maroon); color: var(--white); padding: 3rem 0 2.5rem; border-bottom: 6px solid var(--gold); }
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; }
.page-hero p { color: #f1e7e7; margin-top: .5rem; max-width: 60ch; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; padding: 3rem 0; }
  .hero-art { max-width: 380px; margin: 0 auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .75rem 1.4rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--maroon); }
.btn-light:hover { color: var(--maroon-dark); }
.btn-outline { border-color: var(--white); color: var(--white); margin-left: .5rem; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-maroon { background: var(--maroon); color: var(--white); }
.btn-maroon:hover { background: var(--maroon-light); color: var(--white); }

/* ---------- Sections & cards ---------- */
section { padding: 3.5rem 0; }
.section-title { text-align: center; margin-bottom: 2.25rem; }
.section-title h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-transform: uppercase; }
.section-title p { color: var(--gray); margin-top: .4rem; }
.section-title h2::after {
  content: ""; display: block; width: 70px; height: 4px; background: var(--maroon); margin: .7rem auto 0; border-radius: 2px;
}
.alt-bg { background: var(--white); }

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.6rem; border-top: 5px solid var(--maroon);
}
.card h3 { margin: .75rem 0 .4rem; font-size: 1.3rem; }
.card .icon { width: 56px; height: 56px; }
.card p { color: #4a4444; }

.stats { background: var(--charcoal); color: var(--white); }
.stats .grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); text-align: center; }
.stat strong { display: block; font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 2.6rem; color: var(--gold); }
.stat span { text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split ul { margin: 1rem 0 0 1.2rem; }
.split li { margin-bottom: .4rem; }

.quote {
  background: var(--maroon); color: var(--white); border-radius: var(--radius); padding: 2rem;
  font-size: 1.2rem; font-style: italic; text-align: center;
}
.quote cite { display: block; margin-top: .75rem; font-style: normal; color: var(--gold); font-size: .95rem; }

/* ---------- Core values ---------- */
.values { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.value-pill {
  background: var(--white); border: 2px solid var(--maroon); color: var(--maroon);
  padding: .5rem 1.1rem; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.value-pill[aria-pressed="true"] { background: var(--maroon); color: var(--white); }
.value-detail { max-width: 640px; margin: 1.25rem auto 0; text-align: center; min-height: 3.2rem; color: #4a4444; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card img { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto; border: 4px solid var(--maroon); }
.team-card .role { color: var(--gray); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- Events (interactive) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 1.75rem; }
.filter-btn {
  background: var(--white); border: 2px solid var(--maroon); color: var(--maroon);
  padding: .45rem 1rem; border-radius: 999px; font-weight: 700; cursor: pointer;
}
.filter-btn.active { background: var(--maroon); color: var(--white); }
.event-search { display: block; margin: 0 auto 1.5rem; width: min(100%, 420px); padding: .7rem 1rem; border: 2px solid var(--gray-light); border-radius: 999px; font-size: 1rem; }
.event-search:focus { outline: none; border-color: var(--maroon); }

.event { display: flex; gap: 1.1rem; align-items: flex-start; }
.event-date {
  background: var(--maroon); color: var(--white); border-radius: 8px; min-width: 70px; text-align: center; padding: .5rem .3rem;
}
.event-date .m { display: block; text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; color: var(--gold); }
.event-date .d { display: block; font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 1.8rem; line-height: 1; }
.tag { display: inline-block; background: var(--offwhite); color: var(--maroon); font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px; }
.empty-state { text-align: center; color: var(--gray); display: none; }

.countdown { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.countdown div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: .6rem 1rem; min-width: 80px; text-align: center; }
.countdown strong { display: block; font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 2rem; color: var(--white); }
.countdown span { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }

/* ---------- Quiz (interactive) ---------- */
.quiz { max-width: 720px; margin: 0 auto; }
.quiz-q { font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; color: var(--charcoal); }
.quiz-options { display: grid; gap: .6rem; }
.quiz-options button {
  text-align: left; background: var(--offwhite); border: 2px solid var(--gray-light); border-radius: 8px;
  padding: .75rem 1rem; font-size: 1rem; cursor: pointer;
}
.quiz-options button:hover:not(:disabled) { border-color: var(--maroon); }
.quiz-options button.correct { background: #e5f3e8; border-color: #2e7d32; }
.quiz-options button.wrong { background: #fbe9e9; border-color: var(--maroon); }
.quiz-feedback { margin-top: 1rem; min-height: 1.6rem; font-weight: 600; }
.quiz-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; }
.progress { height: 8px; background: var(--gray-light); border-radius: 999px; overflow: hidden; margin-bottom: 1.25rem; }
.progress > div { height: 100%; background: var(--maroon); width: 0; transition: width .3s ease; }

/* ---------- Forms ---------- */
form .field { margin-bottom: 1.1rem; }
form label { display: block; font-weight: 700; margin-bottom: .35rem; }
form input, form select, form textarea {
  width: 100%; padding: .7rem .9rem; border: 2px solid var(--gray-light); border-radius: 8px; font: inherit; background: var(--white);
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--maroon); }
.error-msg { color: var(--maroon); font-size: .85rem; min-height: 1.1rem; display: block; margin-top: .2rem; }
.form-success { display: none; background: #e5f3e8; border-left: 5px solid #2e7d32; padding: 1rem; border-radius: 6px; margin-top: 1rem; }
.info-list { list-style: none; }
.info-list li { margin-bottom: 1rem; padding-left: 2rem; position: relative; }
.info-list li::before { content: "\2605"; position: absolute; left: 0; color: var(--maroon); font-size: 1.1rem; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 5rem 0; }
.not-found .code { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: clamp(5rem, 18vw, 9rem); color: var(--maroon); line-height: 1; }
.not-found p { margin: 1rem auto 2rem; max-width: 50ch; color: var(--gray); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #ddd; padding: 2.5rem 0 1.25rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); margin-bottom: .6rem; text-transform: uppercase; font-size: 1rem; }
.site-footer a { color: #ddd; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .3rem; }
.footer-bottom { border-top: 1px solid #4d4545; margin-top: 2rem; padding-top: 1rem; font-size: .85rem; text-align: center; color: #aaa; }
.gig-em { color: var(--gold); font-weight: 700; }

.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; background: var(--maroon); color: var(--white);
  border: none; border-radius: 50%; width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

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