/* ==========================================================================
   FALAN LTPN 2026 — design tokens
   Palette: Andean cordillera + coastal Chile, tied to the FALAN/ISN marks
   ========================================================================== */

:root {
  --ink:        #0B2542;   /* deep Andean navy — primary dark */
  --cordillera: #2F6E9E;   /* mountain blue — primary accent */
  --coast:      #8FC1DC;   /* sky blue — secondary accent */
  --sun:        #E2A33D;   /* warm gold — CTA / highlight */
  --paper:      #F7F5EF;   /* warm off-white — page background */
  --paper-dim:  #EFEBE1;
  --ash:        #4B5563;   /* body text on light */
  --line:       #DDD6C7;   /* hairline borders on paper */
  --white:      #FFFFFF;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --radius: 6px;
  --max-w: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ash); }

a { color: var(--cordillera); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--cordillera);
  display: block;
  margin-bottom: 0.6em;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header / nav ---- */

.site-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; opacity: 0.9; }
.brand .mark { color: var(--sun); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

nav.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 0;
  padding: 0;
}

nav.primary-nav a {
  color: rgba(255,255,255,0.82);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

nav.primary-nav a:hover,
nav.primary-nav a.active {
  color: var(--sun);
  text-decoration: none;
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-block; }
  nav.primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: 1rem;
  }
  nav.primary-nav a {
    display: block;
    padding: 0.7rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .site-header .wrap { flex-wrap: wrap; }
}

/* ---- Hero (ridge line signature) ---- */

.hero {
  background: linear-gradient(180deg, var(--ink) 0%, #123356 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  padding-top: 3.6rem;
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--coast);
}

.hero h1 { color: var(--white); margin-top: 0.5em; max-width: 20ch; }

.hero .sub {
  color: rgba(255,255,255,0.78);
  max-width: 52ch;
  font-size: 1.05rem;
}

.hero .cta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
  padding-bottom: 2.4rem;
}

.hero.small .wrap { padding-top: 2.6rem; padding-bottom: 2.6rem; }
.hero.small h1 { max-width: none; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--sun);
  color: var(--ink);
}
.btn-primary:hover { background: #eab35a; text-decoration: none; }

.btn-ghost {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--sun); color: var(--sun); text-decoration: none; }

.ridge {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
}

.ridge-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: rgba(255,255,255,0.75);
}

.ridge-label.week {
  fill: var(--sun);
  font-weight: 600;
}

/* ---- Sections ---- */

section { padding: 3.6rem 0; }
section.tight { padding: 2.4rem 0; }
section.on-dim { background: var(--paper-dim); }

.section-head {
  max-width: 62ch;
  margin-bottom: 2rem;
}

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

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Cards ---- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card h3 { margin-bottom: 0.35em; }
.card .meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cordillera);
  display: block;
  margin-bottom: 0.5em;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 860px) { .quick-links { grid-template-columns: repeat(2, 1fr); } }

.quick-links a {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.quick-links a:hover {
  border-color: var(--cordillera);
  text-decoration: none;
  color: var(--cordillera);
}

/* ---- Empty state ---- */

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 2.6rem 2rem;
  text-align: left;
  max-width: 62ch;
}
.empty-state .eyebrow { margin-bottom: 0.8em; }
.empty-state h3 { margin-bottom: 0.4em; }

/* ---- Materials list (populated by JS) ---- */

.materials-group { margin-bottom: 2.4rem; }
.materials-group h3 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.material-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.material-item:last-child { border-bottom: none; }
.material-item.presenter-break,
.material-note.presenter-break {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--cordillera);
}
.material-item .title { font-weight: 600; }
.material-item .who {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ash);
}
.material-item a.link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---- Schedule table ---- */

.schedule-table-wrap { overflow-x: auto; }
table.schedule {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.92rem;
}
table.schedule caption {
  text-align: left;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--cordillera);
  margin-bottom: 0.6rem;
}
table.schedule th, table.schedule td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
table.schedule thead th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.schedule tbody th {
  background: var(--paper-dim);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.venue-note {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sun);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  font-size: 0.92rem;
}
.venue-note strong { color: var(--ink); }
.venue-note .flag {
  color: #B23A2E;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 0.4rem;
}

table.schedule td .who {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ash);
  margin-top: 0.25rem;
}
table.schedule td .session-sep {
  display: block;
  border-top: 1px dashed var(--line);
  margin-top: 0.55rem;
  padding-top: 0.55rem;
}
table.schedule td.dim { color: var(--ash); font-style: italic; }

.workshop-list-wrap { margin-top: 2rem; }
.workshop-list-wrap h3 { margin-bottom: 0.8rem; }
.workshop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.workshop-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}
.workshop-list .lead {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cordillera);
  margin-top: 0.2rem;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
}
.plain-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.plain-list li:last-child { border-bottom: none; }
.plain-list .affil {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ash);
  display: block;
  margin-top: 0.1rem;
}
@media (min-width: 700px) {
  .plain-list.two-col { columns: 2; column-gap: 2.5rem; }
}

.week-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.week-tabs button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  color: var(--ink);
}
.week-tabs button.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.week-panel { display: none; }
.week-panel.active { display: block; }

/* ---- People (speakers/instructors) ---- */

.person {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.person .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cordillera);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  flex: none;
}
.person .name { font-weight: 600; }
.person .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- About page structure diagram ---- */

.week-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.week-strip .week {
  flex: 1 1 220px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cordillera);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.week-strip .week .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cordillera);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Logo strip ---- */

.logo-strip {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  flex-wrap: wrap;
}
.logo-strip img { height: 40px; width: auto; }
.logo-strip .ibro-mark { height: 34px; }
.logo-strip .placeholder {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  border: 1px dashed rgba(255,255,255,0.3);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
}

.logo-strip.on-light img { height: 36px; }
.logo-strip.on-light .placeholder {
  color: var(--ash);
  border-color: var(--line);
}

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

footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 2.6rem 0 1.8rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}
footer.site-footer .ridge-thin {
  width: 100%;
  display: block;
  opacity: 0.5;
  margin-bottom: 1.6rem;
}
footer.site-footer .foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
footer.site-footer a { color: rgba(255,255,255,0.75); }
footer.site-footer .fine {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2rem;
}

/* ---- Contact page ---- */

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  max-width: 46ch;
}
.contact-card .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cordillera);
}

/* ---- News page ---- */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cordillera);
  white-space: nowrap;
}
.news-title { margin: 0 0 0.3em; }
.news-body { margin: 0; }
.news-link {
  display: inline-block;
  margin-top: 0.6rem;
}
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---- Utility ---- */

.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.mt-0 { margin-top: 0; }
