/* ========================================
   The Iona School — Design System & Styles
   ======================================== */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600&display=swap");

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Properties */
:root {
  --bg: #1a1612;
  --surface: #242018;
  --muted-surface: #2e2820;
  --cream: #f0e8d8;
  --gold: #c9a84c;
  --muted-text: #9a8f7e;
  --border: #3d3530;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --max-width: 1100px;
  --section-pad: 6rem;
  --section-pad-mobile: 4rem;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--cream);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Film Photography Filter */
.film {
  filter: brightness(0.92) contrast(1.08) saturate(0.85) sepia(0.12);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cream);
}

h1 {
  font-size: 3.5rem;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p + p {
  margin-top: 1.5rem;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section */
.section {
  padding: var(--section-pad) 0;
}

/* Gold Rule Divider */
.rule-gold {
  border: none;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
  max-width: 80px;
  margin: 2rem auto;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--cream);
  margin: 2rem 0;
}

/* Drop Cap */
.drop-cap::first-letter {
  font-family: var(--font-heading);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 0.1em;
  margin-top: 0.05em;
  color: var(--gold);
}

/* Card */
.card {
  background: var(--muted-surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem;
}

/* Tier Badge */
.tier-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 22, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-brand:hover {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
  opacity: 1;
}

.nav-cta {
  margin-left: 0.5rem;
}

.nav-cta .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 18, 0.98);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay a {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--cream);
  text-decoration: none;
}

.nav-overlay a:hover {
  color: var(--gold);
}

/* ========================================
   Hero Sections
   ======================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 8rem 2rem 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 22, 18, 0.7) 0%,
    rgba(26, 22, 18, 0.85) 100%
  );
  z-index: 1;
}

/* Grain Texture Overlay */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.35;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 4.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-sub {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Short Page Hero */
.hero-short {
  min-height: auto;
  padding: 10rem 2rem 4rem;
}

/* ========================================
   Pull Quote Section
   ======================================== */
.pull-quote {
  background: var(--surface);
  padding: var(--section-pad) 2rem;
  text-align: center;
}

.pull-quote blockquote {
  border: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--cream);
}

/* ========================================
   Tier Teaser Cards
   ======================================== */
.tier-teasers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.tier-teaser {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.tier-teaser .tier-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.tier-teaser h3 {
  margin-bottom: 0.5rem;
}

.tier-teaser p {
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* ========================================
   Community Section
   ======================================== */
.community-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.community-block:nth-child(even) .community-img {
  order: -1;
}

.community-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.community-text h3 {
  margin-bottom: 1rem;
}

.community-text p {
  color: var(--muted-text);
  font-size: 0.95rem;
}

/* ========================================
   Footer
   ======================================== */
.footer-cta {
  background: var(--surface);
  text-align: center;
  padding: var(--section-pad) 2rem;
}

.footer-cta .hero-tagline {
  margin-bottom: 1rem;
}

.footer-cta p {
  color: var(--muted-text);
  margin-bottom: 2rem;
}

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.footer p {
  color: var(--muted-text);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--muted-text);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--cream);
}

/* ========================================
   About Page
   ======================================== */
.vision-text {
  max-width: 750px;
  margin: 0 auto;
}

.vision-text p {
  color: var(--cream);
  opacity: 0.9;
}

.space-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.space-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 2px;
}

.space-card h4 {
  margin-bottom: 0.5rem;
}

.space-card p {
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* ========================================
   Curriculum Page
   ======================================== */
.tier-subnav {
  position: sticky;
  top: 72px;
  background: rgba(26, 22, 18, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0;
}

.tier-subnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

.tier-subnav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--muted-text);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.tier-subnav a:hover,
.tier-subnav a.active {
  color: var(--cream);
  border-bottom-color: var(--gold);
  opacity: 1;
}

/* Tier Section */
.tier-section {
  border-bottom: 1px solid var(--border);
}

.tier-section:last-child {
  border-bottom: none;
}

.tier-header {
  margin-bottom: 2rem;
}

.tier-header .tier-badge {
  margin-bottom: 1rem;
}

.tier-header h2 {
  margin-bottom: 0.5rem;
}

.tier-header .tier-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--muted-text);
  font-size: 1rem;
}

.tier-lead {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
}

/* Stepped Timeline */
.timeline {
  display: flex;
  gap: 0;
  margin: 2rem 0;
}

.timeline-step {
  flex: 1;
  padding: 1.5rem;
  border-top: 3px solid var(--border);
  position: relative;
}

.timeline-step.active,
.timeline-step:hover {
  border-top-color: var(--gold);
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 1.5rem;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 50%;
}

.timeline-step h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gold);
}

.timeline-step p {
  color: var(--muted-text);
  font-size: 0.85rem;
}

/* Competency Grid */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.competency-item {
  padding: 1.25rem;
}

.competency-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--cream);
}

.competency-item p {
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* Pilgrimage Callout */
.pilgrimage-callout {
  border-left: 3px solid var(--gold);
  background: var(--surface);
  padding: 2rem 2rem 2rem 2.5rem;
  margin: 2rem 0;
  border-radius: 0 2px 2px 0;
}

.pilgrimage-callout h3 {
  color: var(--gold);
  margin-bottom: 1rem;
}

.pilgrimage-callout img {
  margin-top: 1.5rem;
  border-radius: 2px;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ========================================
   Admissions Page
   ======================================== */
.who-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.who-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.who-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1rem;
}

.who-card p {
  color: var(--cream);
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Commitment Grid */
.commitment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.commitment-col {
  text-align: center;
}

.commitment-col .tier-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.commitment-col h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.commitment-col ul {
  list-style: none;
  padding: 0;
}

.commitment-col li {
  color: var(--muted-text);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

/* Application Steps */
.steps {
  max-width: 600px;
  margin: 2rem auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
}

.step p {
  color: var(--cream);
  opacity: 0.9;
  padding-top: 0.5rem;
}

/* ========================================
   FAQ Accordion
   ======================================== */
.accordion {
  max-width: 750px;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  text-align: left;
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.accordion-trigger:hover {
  color: var(--gold);
}

.accordion-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--gold);
  transition: transform 0.3s;
  font-style: normal;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.accordion-panel-inner {
  padding: 0 0 1.5rem;
  color: var(--muted-text);
  line-height: 1.8;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a8f7e' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ========================================
   Fade In Animation
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.75rem;
  }
  .hero h1 {
    font-size: 3.5rem;
  }

  .tier-teasers {
    grid-template-columns: repeat(2, 1fr);
  }

  .commitment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .space-grid {
    grid-template-columns: 1fr 1fr;
  }

  .competency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  :root {
    --section-pad: 4rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  .hero h1 {
    font-size: 2.75rem;
  }
  .hero {
    padding: 7rem 1.5rem 4rem;
  }
  .hero-short {
    padding: 8rem 1.5rem 3rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }

  .tier-teasers {
    grid-template-columns: 1fr;
  }

  .community-block {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .community-block:nth-child(even) .community-img {
    order: 0;
  }

  .space-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    flex-direction: column;
  }

  .competency-grid {
    grid-template-columns: 1fr;
  }

  .who-cards {
    grid-template-columns: 1fr;
  }

  .commitment-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pull-quote blockquote {
    font-size: 1.2rem;
  }

  .tier-subnav-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tier-subnav a {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
  }
}
