/* GBA — exploración de materiales (papel, aluminio, lino).
   Esqueuomorfismo contenido: pocas texturas, todas hechas en CSS. */

:root {
  --paper: #f3f0e7;
  --paper-deep: #e8e3d6;
  --sheet: #fffdf8;
  --ink: #26292d;
  --muted: #6c7076;
  --rule: #d9d4c7;
  --cell-line: #c4bfb2;
  --value: #385487;
  --blue: #2f6ae0;
  --green: #1aa877;
  --linen: #2a2d31;
  --serif: Georgia, 'Times New Roman', serif;
  --ui: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --emboss: 0 1px 0 rgba(255, 255, 255, .85);
  --deboss: 0 -1px 0 rgba(0, 0, 0, .55);
  color-scheme: light;
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--noise), radial-gradient(ellipse at 50% 0, #faf8f2, var(--paper) 60%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(47, 106, 224, .55); outline-offset: 3px; border-radius: 6px; }
::selection { background: #b9d0f7; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 99; padding: 12px 16px; background: #fff; border-radius: 6px; }
.skip:focus { top: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 5vw; }

/* Type */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); text-shadow: var(--emboss); margin: 0; }
h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -.02em; }
h2 em, h1 em { color: var(--blue); }
.eyebrow {
  margin: 0 0 14px;
  font: 600 11px/1.4 var(--ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #80848a;
  text-shadow: var(--emboss);
}

/* Buttons: soft split gloss, like the controls of the era */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 16px;
  border: 1px solid #8e8e8e; border-radius: 6px;
  background: linear-gradient(#ffffff, #f3f3f3 49%, #e2e2e2 51%, #ececec);
  box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(0, 0, 0, .12);
  color: #333; font: 600 13px/1 var(--ui); text-shadow: var(--emboss);
  cursor: pointer; white-space: nowrap;
}
.btn:active { background: linear-gradient(#d4d4d4, #e4e4e4); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); }
.btn-small { height: 26px; padding: 0 11px; font-size: 12px; }
.btn-large { height: 42px; padding: 0 22px; font-size: 15px; border-radius: 8px; }
.btn-blue {
  border-color: #1d4aa8;
  background: linear-gradient(#80adf8, #5189ef 49%, #2f6ae0 51%, #3f7ae8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 2px rgba(0, 0, 0, .2);
  color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
}
.btn-blue:active { background: linear-gradient(#2558c4, #3a72e0); }
.btn-dark {
  border-color: #0d0e10;
  background: linear-gradient(#61666d, #42464c 49%, #31353a 51%, #3b3f45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 0 rgba(255, 255, 255, .08);
  color: #f2f2f2; text-shadow: var(--deboss);
}

/* Toolbar: brushed aluminium */
.toolbar {
  position: sticky; top: 0; z-index: 50;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, rgba(0, 0, 0, .015) 1px 3px),
    linear-gradient(#f5f5f5, #dedede 55%, #d0d0d0);
  border-bottom: 1px solid #8d8d8d;
  box-shadow: inset 0 1px 0 #fff, 0 1px 4px rgba(0, 0, 0, .14);
}
.toolbar-row { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: flex; align-items: center; gap: 9px; font: 700 19px/1 var(--ui); letter-spacing: -.03em; color: #2b2b2b; text-shadow: var(--emboss); }
.wordmark img { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.segmented {
  display: flex; overflow: hidden;
  border: 1px solid #8a8a8a; border-radius: 6px;
  background: linear-gradient(#fefefe, #ececec 49%, #dedede 51%, #e8e8e8);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(255, 255, 255, .6);
}
.segmented a { padding: 6px 14px; font: 600 12px/1.2 var(--ui); color: #3b3b3b; text-shadow: var(--emboss); }
.segmented a + a { border-left: 1px solid #a9a9a9; }
.segmented a:hover { background: rgba(255, 255, 255, .45); }
.segmented a[aria-current] { background: linear-gradient(#b9b9b9, #cfcfcf); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .22); color: #1f1f1f; }
.toolbar-tools { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.hero h1 { font-size: clamp(54px, 7vw, 104px); line-height: .98; letter-spacing: -.045em; margin-bottom: 26px; }
.lede { max-width: 470px; margin: 0 0 30px; font-size: 17px; line-height: 1.65; color: #555a60; text-shadow: var(--emboss); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: clamp(40px, 6vw, 72px); font: 600 11px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #9a9da2; text-shadow: var(--emboss); text-align: center; }

/* GBA emblem */
.hero-emblem { display: flex; justify-content: center; }
.hero-emblem img { width: min(100%, 440px); height: auto; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.section-head > p { max-width: 360px; margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); text-shadow: var(--emboss); }

/* A sheet of paper resting on the page */
.sheet {
  position: relative; padding: clamp(28px, 5vw, 64px);
  background: var(--noise), var(--sheet);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 2px 4px rgba(0, 0, 0, .06), 0 22px 44px -22px rgba(40, 30, 10, .35);
}
.mission { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 6vw, 80px); }
.mission-text p { margin: 0 0 18px; font-size: 16px; line-height: 1.8; color: #50555b; }
.mission-text .footnote { margin: 28px 0 0; padding-top: 16px; border-top: 1px dashed var(--rule); font-size: 12px; letter-spacing: .04em; color: #8a8d92; }

/* Ecosystem: icons + grouped cells */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-head h3 { font: 700 17px/1.2 var(--ui); letter-spacing: -.01em; }
.app-head h3 em { font: italic 400 19px var(--serif); color: var(--ink); }
.app-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); text-shadow: var(--emboss); }
.app-icon { flex: none; width: 96px; height: 96px; margin: -10px -4px -10px -10px; }
.cell {
  overflow: hidden; padding: 20px 20px 0;
  background: #fff; border: 1px solid var(--cell-line); border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 1px 3px rgba(0, 0, 0, .06);
}
.cell h4 { margin-bottom: 10px; font-size: 21px; line-height: 1.25; text-shadow: none; }
.cell p { margin: 0 0 20px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.row-link, .contact-list .group-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.row-link { margin: 0 -20px; padding: 14px 20px; border-top: 1px solid #e3dfd5; font: 600 14px/1.2 var(--ui); color: var(--value); }
.row-link:hover, .contact-list .group-row:hover { background: linear-gradient(#f6f8fc, #edf1f8); }
.chevron { font: 400 22px/1 var(--ui); color: #a1a5ab; }

/* Sepia on a glass shelf */
.sepia-home {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--noise), linear-gradient(var(--paper-deep), #efeadf);
  border-top: 1px solid #d4cebf; border-bottom: 1px solid #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.sepia-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.sepia-logo { display: block; width: min(300px, 80%); height: auto; margin-bottom: 24px; }
.sepia-copy h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 14px; }
.sepia-copy > p { margin: 0 0 26px; font-size: 16px; line-height: 1.65; color: var(--muted); text-shadow: var(--emboss); }
.sepia-copy .sepia-note { margin: 18px 0 0; font-size: 12px; color: #8a8d92; }
.shelf { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(20px, 5vw, 56px); padding-bottom: 56px; }
.shelf figure { position: relative; z-index: 1; margin: 0 0 -6px; }
.shelf img { display: block; width: clamp(110px, 14vw, 168px); height: auto; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .22)); }
.shelf figcaption { position: absolute; left: 0; right: 0; top: calc(100% + 30px); text-align: center; font: 600 12px/1 var(--ui); color: #5f6368; text-shadow: var(--emboss); }
.shelf-board {
  position: absolute; left: 4%; right: 4%; bottom: 40px; height: 26px;
  background: linear-gradient(rgba(255, 255, 255, .92), rgba(214, 219, 226, .7));
  border: 1px solid rgba(0, 0, 0, .14); border-radius: 3px;
  box-shadow: inset 0 1px 0 #fff, 0 14px 18px -10px rgba(0, 0, 0, .35);
  transform: perspective(260px) rotateX(48deg);
  transform-origin: bottom;
}

/* Dark linen */
.linen {
  background:
    var(--noise),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px),
    var(--linen);
  color: #d6dadf;
}
.linen h2, .linen h3 { color: #eef0f2; text-shadow: var(--deboss); }
.linen h2 em { color: #8fd8b8; }
.linen .eyebrow { color: #8e959c; text-shadow: var(--deboss); }
#anima { box-shadow: inset 0 8px 14px -8px rgba(0, 0, 0, .6), inset 0 -8px 14px -8px rgba(0, 0, 0, .6); }
.research-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); margin-bottom: 36px; }
.research-intro > p { margin: 0; font-size: 17px; line-height: 1.8; color: #c3c9cf; text-shadow: var(--deboss); }
.well {
  padding: 22px;
  background: rgba(0, 0, 0, .26);
  border-radius: 10px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 255, 255, .07);
}
.status-well { font-size: 13px; line-height: 1.75; color: #b7bec5; }
.status-well strong { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #eef0f2; }
.led { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c6ffe8, #22c58b 60%); box-shadow: 0 0 8px #22c58b; }
.research-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.well-number { font: 600 11px/1 var(--ui); letter-spacing: .14em; color: #7ed9b3; }
.well h3 { margin: 16px 0 10px; font-size: 23px; line-height: 1.2; }
.well p { margin: 0; font-size: 14px; line-height: 1.7; color: #aeb5bc; }
.disclosure { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.disclosure summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; color: #d8dde2; text-shadow: var(--deboss); }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: ''; border: 5px solid transparent; border-left: 7px solid #aab1b8; transition: transform .15s; transform-origin: 3px 50%; }
.disclosure[open] summary::before { transform: rotate(90deg); }
.disclosure p { max-width: 860px; font-size: 14px; line-height: 1.8; color: #aeb5bc; }

/* Grouped tables */
.group {
  overflow: hidden; margin: 0;
  background: #fff; border: 1px solid var(--cell-line); border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 1px 3px rgba(0, 0, 0, .06);
}
.group-row + .group-row { border-top: 1px solid #e3dfd5; }
.principles { max-width: 920px; }
.principles .group-row { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 22px 24px; }
.principles h3 { font-size: 22px; margin-bottom: 6px; text-shadow: none; }
.principles p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.badge {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #1d4aa8;
  background: linear-gradient(#80adf8, #4a83ee 49%, #2f6ae0 51%, #3f7ae8);
  color: #fff; font: 700 13px/1 var(--ui); text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.team { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.team h2 { margin-bottom: 22px; }
.team p:not(.eyebrow) { font-size: 16px; line-height: 1.8; color: var(--muted); text-shadow: var(--emboss); }
.details .group-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 20px; }
.details dt { font: 700 14px/1.3 var(--ui); color: #2f3237; }
.details dd { margin: 0; font-size: 14px; color: var(--value); text-align: right; overflow-wrap: anywhere; }

.contact { background: var(--noise), linear-gradient(#ebe6da, var(--paper)); border-top: 1px solid #d4cebf; }
.contact h2 { font-size: clamp(42px, 6vw, 80px); margin-bottom: 36px; }
.contact-list { max-width: 720px; }
.contact-list .group-row { padding: 16px 20px; font-size: 17px; color: var(--value); }
.contact-list small { display: block; margin-bottom: 4px; font: 600 11px/1.3 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #8a8d92; }

/* Footer */
.footer { padding: 34px 0; border-top: 1px solid #111; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 12px; color: #8f969d; text-shadow: var(--deboss); }
.footer nav { display: flex; gap: 20px; }
.footer nav a:hover { color: #eef0f2; }
.motto { font: italic 22px var(--serif); color: #e8ebee; }

/* Narrow screens */
@media (max-width: 960px) {
  .segmented a { padding: 6px 10px; }
  .toolbar-cta { display: none; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .segmented {
    display: none; position: absolute; top: calc(100% + 8px); right: 5vw; width: 240px; flex-direction: column;
    background: #fbfbfb; border-radius: 9px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 14px 34px rgba(0, 0, 0, .3);
    border: 0;
  }
  .segmented.is-open { display: flex; }
  .segmented a { padding: 14px 16px; font-size: 15px; }
  .segmented a + a { border-left: 0; border-top: 1px solid #e2e2e2; }
  .hero-grid, .mission, .sepia-grid, .research-intro, .team { grid-template-columns: 1fr; }
  .hero-emblem img { width: min(72%, 290px); }
  .apps, .research-lines { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head > p { margin-top: 16px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer nav { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .toolbar-row { height: 52px; }
  .hero h1 { font-size: clamp(48px, 14vw, 64px); }
  .principles .group-row { padding: 18px; }
  .details .group-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .details dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
