:root {
  --navy: #071d2d;
  --blue: #0b3656;
  --blue-light: #eaf1f5;
  --red: #cf1823;
  --red-dark: #a50f18;
  --ink: #0d1d2a;
  --muted: #61717d;
  --line: #d8e0e5;
  --cream: #f3f1eb;
  --white: #fff;
  --page: #f7f8f8;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Avenir Next", "Helvetica Neue", sans-serif;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--body); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .8rem 1rem; background: #fff; color: #000; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid #f7c844; outline-offset: 4px; }

.hero { position: relative; min-height: 790px; height: 94vh; max-height: 980px; overflow: hidden; color: #fff; background: var(--navy); }
.hero-image { position: absolute; inset: 0; background: url("hero-turrialba.jpg") center 56% / cover no-repeat; transform: scale(1.03); animation: hero-reveal 1.5s cubic-bezier(.2,.8,.2,1) both; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,14,24,.91) 0%, rgba(4,20,32,.68) 43%, rgba(4,17,28,.3) 75%), linear-gradient(0deg, rgba(2,13,22,.58), transparent 50%); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 120px 120px; mask-image: linear-gradient(to right, #000, transparent 75%); }

.topbar { position: relative; z-index: 5; max-width: var(--max); height: 126px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.24); }
.brand { display: flex; align-items: center; gap: 18px; width: max-content; text-transform: uppercase; font-size: .7rem; font-weight: 750; line-height: 1.35; letter-spacing: .12em; }
.brand-logos { display: flex; align-items: center; gap: 14px; }
.brand-logos img { display: block; object-fit: contain; }
.brand-logos .ovsicori-logo { width: 104px; height: 82px; }
.brand-logos .una-logo { width: 112px; height: auto; }
.brand-logos i { width: 1px; height: 48px; background: rgba(255,255,255,.36); }
.desktop-nav { display: flex; height: 100%; align-items: center; gap: 32px; font-size: .9rem; font-weight: 650; }
.desktop-nav a { position: relative; display: grid; place-items: center; height: 100%; opacity: .8; }
.desktop-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 4px; background: var(--red); transition: .25s ease; }
.desktop-nav a:hover, .desktop-nav a.active { opacity: 1; }
.desktop-nav a:hover::after, .desktop-nav a.active::after { left: 0; right: 0; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 24px; }
.header-link { font-size: .86rem; font-weight: 650; }
.menu-button { display: grid; grid-template-columns: 25px auto; grid-template-rows: repeat(3, 5px); gap: 0 11px; align-items: center; border: 0; color: #fff; background: transparent; cursor: pointer; padding: 10px 0; }
.menu-button span { width: 25px; height: 2px; background: currentColor; }
.menu-button b { grid-column: 2; grid-row: 1 / 4; font-size: .84rem; }

.hero-content { position: relative; z-index: 3; width: min(var(--max), calc(100% - 80px)); margin: 0 auto; padding-top: clamp(105px, 14vh, 165px); }
.overline, .eyebrow { margin: 0 0 18px; color: var(--red); text-transform: uppercase; font-size: .75rem; font-weight: 850; letter-spacing: .18em; }
.overline { color: #fff; display: flex; align-items: center; gap: 12px; }
.overline::before { content: ""; width: 46px; height: 3px; background: var(--red); }
.hero h1 { max-width: 870px; margin: 0; font-family: var(--display); font-size: clamp(4.1rem, 7.2vw, 7.6rem); line-height: .84; letter-spacing: -.045em; text-transform: uppercase; }
h1 em, h2 em { color: var(--red); font-style: normal; }
.hero-intro { max-width: 700px; margin: 34px 0 36px; font-size: clamp(1.05rem, 1.45vw, 1.35rem); line-height: 1.55; color: rgba(255,255,255,.84); }
.site-search { width: min(730px, 100%); min-height: 70px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 18px; padding: 8px 9px 8px 24px; background: #fff; box-shadow: 0 24px 50px rgba(0,0,0,.22); }
.site-search svg { width: 23px; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.site-search input { min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: 1rem; }
.site-search button { align-self: stretch; min-width: 126px; border: 0; color: #fff; background: var(--red); cursor: pointer; font-weight: 800; transition: background .2s; }
.site-search button:hover { background: var(--red-dark); }
.hero-status { position: absolute; z-index: 3; right: max(40px, calc((100vw - var(--max)) / 2 + 40px)); bottom: 48px; display: flex; align-items: center; gap: 14px; padding-left: 26px; border-left: 1px solid rgba(255,255,255,.35); }
.hero-status div { display: grid; gap: 2px; }
.hero-status strong { text-transform: uppercase; font-size: .72rem; letter-spacing: .13em; }
.hero-status span:last-child { font-size: .78rem; color: rgba(255,255,255,.65); }
.live-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 6px rgba(207,24,35,.18); animation: pulse 2s infinite; }
.scroll-cue { position: absolute; z-index: 3; left: max(40px, calc((100vw - var(--max)) / 2 + 40px)); bottom: 45px; display: flex; align-items: center; gap: 13px; text-transform: uppercase; letter-spacing: .16em; font-size: .64rem; font-weight: 750; }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(#fff, transparent); }

.drawer-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(4,14,23,.68); backdrop-filter: blur(3px); }
.drawer { position: fixed; z-index: 80; inset: 0 auto 0 0; width: min(580px, 92vw); padding: 34px clamp(30px, 5vw, 72px); color: var(--ink); background: #fff; transform: translateX(-102%); transition: transform .45s cubic-bezier(.2,.8,.2,1); box-shadow: 22px 0 80px rgba(0,0,0,.24); overflow: auto; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.drawer-logos { display: flex; align-items: center; gap: 18px; }
.drawer-logos img { width: 130px; }
.drawer-logos .una-logo { width: 126px; padding: 9px 12px; background: var(--navy); }
.drawer-logos span { width: 1px; height: 48px; background: var(--line); }
.icon-button { width: 46px; height: 46px; position: relative; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.drawer-close span { position: absolute; width: 22px; height: 2px; left: 11px; top: 21px; background: var(--ink); transform: rotate(45deg); }
.drawer-close span:last-child { transform: rotate(-45deg); }
.drawer-nav { display: grid; padding: 35px 0; }
.drawer-nav > p { margin: 0 0 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 800; }
.drawer-nav a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 750; transition: color .2s, padding .2s; }
.drawer-nav a:hover { color: var(--red); padding-left: 10px; }
.drawer-nav a span { font-family: var(--body); color: #9aa7ae; font-size: .65rem; letter-spacing: .12em; }
.drawer-nav .drawer-subitem { padding: 13px 0 13px 24px; color: var(--blue); font-family: var(--body); font-size: 1rem; font-weight: 750; }
.drawer-nav .drawer-subitem:hover { padding-left: 34px; }
.drawer-nav .drawer-subitem span { color: var(--red); }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; font-size: .85rem; }
.drawer-meta a { font-weight: 750; }
.drawer-meta p { width: 100%; margin: 20px 0 0; color: var(--muted); }
body.drawer-open { overflow: hidden; }

main { overflow: hidden; }
.quick-actions { position: relative; z-index: 6; max-width: var(--max); margin: -34px auto 0; padding: 0 40px; display: grid; grid-template-columns: repeat(5, 1fr); }
.quick-card { position: relative; min-height: 260px; padding: 34px 30px 30px; display: grid; align-content: space-between; border-right: 1px solid var(--line); background: #fff; transition: transform .3s, box-shadow .3s; overflow: hidden; }
.quick-card:first-child { border-left: 1px solid var(--line); }
.quick-card:hover { z-index: 2; transform: translateY(-8px); box-shadow: 0 26px 50px rgba(7,29,45,.13); }
.quick-card.featured { color: #fff; background: var(--red); border-color: var(--red); }
.quick-number { position: absolute; right: 22px; top: 18px; color: #b4bec4; font-size: .62rem; letter-spacing: .12em; }
.featured .quick-number { color: rgba(255,255,255,.6); }
.quick-icon { width: 52px; height: 52px; }
.quick-icon svg { width: 100%; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.featured .quick-icon svg { stroke: #fff; }
.quick-card p { margin: 0 0 5px; color: var(--muted); text-transform: uppercase; font-size: .62rem; letter-spacing: .13em; font-weight: 800; }
.featured p { color: rgba(255,255,255,.7); }
.quick-card h2 { margin: 0 0 20px; font-family: var(--display); font-size: 1.75rem; line-height: 1; }
.quick-card div > span { font-size: .78rem; font-weight: 700; }
.quick-card div > span b { margin-left: 7px; color: var(--red); }
.featured div > span b { color: #fff; }

.earthquake-section, .knowledge-section { max-width: var(--max); margin: 0 auto; padding: 135px 40px; }
.section-label { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.section-label span { color: var(--red); font-weight: 800; font-size: .7rem; }
.section-label p { margin: 0; text-transform: uppercase; font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.section-heading { display: grid; grid-template-columns: 1.55fr .8fr; gap: 80px; align-items: end; padding: 64px 0; }
.section-heading h2, .volcano-copy h2 { margin: 0; font-family: var(--display); font-size: clamp(3.25rem, 5vw, 6rem); line-height: .9; letter-spacing: -.035em; text-transform: uppercase; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.earthquake-grid { display: grid; grid-template-columns: .8fr 1.5fr; gap: 32px; }
.latest-event { position: relative; min-height: 460px; padding: 36px; color: #fff; background: var(--navy); overflow: hidden; }
.latest-event::before { content: ""; position: absolute; width: 350px; height: 350px; right: -180px; bottom: -170px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.025); }
.latest-topline { position: relative; display: flex; gap: 12px; align-items: center; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.latest-topline span:last-child { margin-left: auto; color: rgba(255,255,255,.55); text-transform: none; letter-spacing: 0; }
.magnitude-block { position: relative; display: flex; align-items: baseline; gap: 8px; margin: 28px 0 4px; color: var(--red); }
.magnitude-block span { font-weight: 900; font-size: 1.5rem; }
.magnitude-block strong { font-family: var(--display); font-size: 6.8rem; line-height: .9; }
.latest-event h3 { position: relative; margin: 12px 0 26px; max-width: 420px; font-size: 1.45rem; line-height: 1.3; }
.latest-event dl { position: relative; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.latest-event dl div { display: grid; gap: 2px; }
.latest-event dt { color: rgba(255,255,255,.55); font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.latest-event dd { margin: 0; font-size: .86rem; font-weight: 700; }
.latest-event > a { position: absolute; left: 36px; bottom: 34px; font-weight: 800; font-size: .82rem; }
.latest-event > a span { margin-left: 12px; color: var(--red); }
.event-list-wrap { padding: 10px 0 0; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 0 18px; border-bottom: 2px solid var(--ink); }
.list-head h3 { margin: 0; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; }
.list-head a { color: var(--red); font-size: .78rem; font-weight: 800; }
.event-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 22px; align-items: center; padding: 23px 6px; border-bottom: 1px solid var(--line); transition: background .2s, padding .2s; }
.event-row:hover { padding-left: 16px; background: #fff; }
.event-row strong { font-family: var(--display); font-size: 2.35rem; color: var(--red); }
.event-row h4 { margin: 0 0 4px; font-size: 1rem; }
.event-row p, .event-row time { margin: 0; color: var(--muted); font-size: .78rem; }
.sismology-links { margin-top: 42px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.sismology-links a { min-height: 155px; padding: 30px 34px; display: grid; align-content: center; border-right: 1px solid var(--line); transition: color .2s, background .2s; }
.sismology-links a:last-child { border-right: 0; }
.sismology-links a:hover { color: #fff; background: var(--blue); }
.sismology-links span { color: var(--red); text-transform: uppercase; font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.sismology-links strong { margin: 7px 0 12px; font: 750 1.55rem var(--display); text-transform: uppercase; }
.sismology-links b { font-size: .76rem; }
.event-row time { text-align: right; }
.event-placeholder { height: 96px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); background-size: 200% 100%; animation: loading 1.5s infinite; }
.event-error { padding: 40px 0; color: var(--muted); }

.volcano-section { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 760px; background: var(--navy); color: #fff; }
.volcano-photo { min-height: 680px; background: linear-gradient(90deg, transparent 70%, var(--navy)), url("hero-turrialba.jpg") center / cover no-repeat; }
.volcano-copy { padding: 100px clamp(40px, 6vw, 110px) 80px; }
.section-label.light { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.6); }
.volcano-copy .eyebrow { margin-top: 64px; }
.volcano-copy > p:not(.eyebrow) { max-width: 610px; margin: 36px 0; color: rgba(255,255,255,.68); font-size: 1rem; line-height: 1.8; }
.volcano-links { display: grid; border-top: 1px solid rgba(255,255,255,.18); }
.volcano-links a { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.18); font-weight: 750; }
.volcano-links a span { color: var(--red); }
.volcano-names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.volcano-names span { padding: 7px 12px; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.72); font-size: .7rem; }

.section-heading.compact { align-items: center; }
.outline-link, .solid-link { justify-self: start; padding: 16px 20px; border: 1px solid var(--ink); font-weight: 800; font-size: .8rem; }
.outline-link span, .solid-link span { margin-left: 20px; color: var(--red); }
.knowledge-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; }
.knowledge-card { min-height: 370px; padding: 34px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; transition: transform .3s; }
.knowledge-card:hover { transform: translateY(-8px); }
.knowledge-card > span, .photo-card span { margin-bottom: auto; text-transform: uppercase; font-size: .65rem; letter-spacing: .15em; font-weight: 850; }
.knowledge-card h3 { max-width: 380px; margin: 14px 0; font-family: var(--display); font-size: 2.25rem; line-height: 1.05; text-transform: uppercase; }
.knowledge-card p { margin: 0 0 26px; opacity: .72; font-size: .9rem; }
.knowledge-card b { font-size: .76rem; }
.knowledge-card.red { color: #fff; background: var(--red); }
.knowledge-card.pale { background: var(--blue-light); }
.photo-card { position: relative; color: #fff; background: linear-gradient(0deg, rgba(4,18,29,.9), rgba(4,18,29,.08)), url("hero-turrialba.jpg") center 40% / cover no-repeat; }
.photo-card div { position: relative; }

.institution-section { padding: 100px max(40px, calc((100vw - var(--max)) / 2 + 40px)); display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 70px; align-items: center; color: #fff; background: var(--red); }
.institution-section h2 { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: clamp(2.6rem, 4vw, 4.5rem); line-height: .95; }
.institution-section .eyebrow { color: #fff; opacity: .7; }
.institution-section > p { margin: 0; opacity: .8; line-height: 1.75; }
.solid-link { border-color: #fff; color: #fff; white-space: nowrap; }
.solid-link span { color: #fff; }

footer { min-height: 250px; padding: 55px max(40px, calc((100vw - var(--max)) / 2 + 40px)); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 70px; align-items: center; color: rgba(255,255,255,.7); background: #04131f; }
.footer-brand { display: flex; align-items: center; gap: 24px; }
.footer-logos { display: flex; align-items: center; gap: 16px; }
.footer-logos img { width: 120px; }
.footer-logos .una-logo { width: 118px; }
.footer-logos span { width: 1px; height: 52px; background: rgba(255,255,255,.25); }
.footer-brand p, .footer-note p { font-size: .76rem; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: .82rem; font-weight: 750; color: #fff; }
.footer-note { text-align: right; }
.prototype-note { position: fixed; z-index: 40; right: 18px; bottom: 16px; padding: 7px 10px; color: #fff; background: rgba(7,29,45,.82); backdrop-filter: blur(8px); font-size: .62rem; letter-spacing: .05em; }

@keyframes hero-reveal { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1.03); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(207,24,35,0); } }
@keyframes loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .desktop-nav, .header-link { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 2; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-card:nth-child(3) { border-left: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 30px; }
  .earthquake-grid { grid-template-columns: 1fr; }
  .volcano-section { grid-template-columns: .8fr 1.2fr; }
  .knowledge-grid { grid-template-columns: 1fr 1fr; }
  .knowledge-card:last-child { grid-column: 1 / -1; min-height: 280px; }
  .institution-section { grid-template-columns: 1fr 1fr; }
  .institution-section .solid-link { grid-column: 1 / -1; }
  .sismology-links { grid-template-columns: 1fr 1fr; }
  .sismology-links a:nth-child(2) { border-right: 0; }
  .sismology-links a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .hero { min-height: 760px; height: 100svh; }
  .hero-image { background-position: 60% center; }
  .topbar { height: 92px; padding: 0 20px; }
  .brand { gap: 0; }
  .brand-logos { gap: 10px; }
  .brand-logos .ovsicori-logo { width: 78px; height: 62px; }
  .brand-logos .una-logo { width: 88px; }
  .brand-logos i { height: 36px; }
  .brand span, .menu-button b { display: none; }
  .menu-button { grid-template-columns: 25px; }
  .hero-content { width: calc(100% - 40px); padding-top: 105px; }
  .hero h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-intro { margin: 25px 0; font-size: .98rem; }
  .site-search { grid-template-columns: 24px 1fr; min-height: 58px; padding-left: 17px; }
  .site-search button { grid-column: 1 / -1; min-height: 52px; margin: 0 -9px -8px -17px; }
  .hero-status { left: 20px; right: auto; bottom: 28px; }
  .scroll-cue { display: none; }
  .quick-actions { margin: 0; padding: 0; grid-template-columns: 1fr; }
  .quick-card { min-height: 205px; border-left: 0 !important; border-right: 0; border-bottom: 1px solid var(--line); }
  .earthquake-section, .knowledge-section { padding: 90px 20px; }
  .section-heading { padding: 45px 0; }
  .section-heading h2, .volcano-copy h2 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .latest-event { min-height: 520px; padding: 28px; }
  .latest-event > a { left: 28px; }
  .latest-event dl { grid-template-columns: 1fr 1fr; }
  .sismology-links { grid-template-columns: 1fr; }
  .sismology-links a { border-right: 0; border-bottom: 1px solid var(--line); }
  .sismology-links a:last-child { border-bottom: 0; }
  .event-row { grid-template-columns: 70px 1fr; gap: 12px; }
  .event-row time { grid-column: 2; text-align: left; }
  .volcano-section { grid-template-columns: 1fr; }
  .volcano-photo { min-height: 390px; background-image: linear-gradient(0deg, var(--navy), transparent 50%), url("hero-turrialba.jpg"); }
  .volcano-copy { padding: 20px 20px 80px; }
  .volcano-copy .eyebrow { margin-top: 48px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .knowledge-card:last-child { grid-column: auto; }
  .institution-section { padding: 75px 20px; grid-template-columns: 1fr; gap: 36px; }
  .institution-section .solid-link { grid-column: auto; }
  footer { padding: 50px 20px 85px; grid-template-columns: 1fr; gap: 35px; }
  .footer-note { text-align: left; }
  .prototype-note { position: static; padding: 12px 20px; text-align: center; background: #04131f; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
