/* Shared masthead and the home portrait. */
:root {
  --header-h: 78px;
  --page-pad: max(clamp(1.15rem, 5vw, 5rem), calc((100vw - 1440px) / 2));
  --ink-deep: #091b22;
  --light-mint: #aff3d7;
}
.site-header, .site-header.is-light {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(.8rem, 2vw, 2rem);
  align-items: center;
  background: #fafbf8;
  border-bottom: 1px solid #d4ded9;
  box-shadow: none;
  backdrop-filter: none;
}
.site-header .menu-toggle { display: none; }
.site-header .site-nav {
  position: static;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  align-self: auto;
  visibility: visible;
  opacity: 1;
  gap: clamp(.35rem,.9vw,1.1rem);
  padding: 0;
  margin: 0;
  background: transparent;
  color: #112e30;
}
.site-header .site-nav > a {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: .52rem .48rem;
  font: 600 .79rem/1.2 var(--font-display);
  letter-spacing: -.015em;
  border-radius: 999px;
  transition: background .22s, color .22s;
}
.site-header .site-nav > a::after { display: none; }
.site-header .site-nav > a:is(.is-active,:hover) { background: #e1eee7; color: #133b36; }
.site-header .language-toggle {
  margin: 0;
  padding: .5rem .58rem;
  min-height: 34px;
  border: 1px solid #c3d2cd;
  border-radius: 999px;
  gap: .38rem;
}
.site-header .language-current { text-decoration-color: #24755e; }
:focus-visible { outline: 2px solid #2eaa8a; outline-offset: 4px; }
body.panel-mode #main>section.is-current { animation: sheet-arrive .42s ease-out both; }
@keyframes sheet-arrive { from { opacity: .45; translate: 0 7px; } to { opacity: 1; translate: 0; } }

#top.hero {
  background: radial-gradient(ellipse at 82% 44%, #1d4c50 0%, #112d36 34%, #0b1d26 64%, #091921 91%);
  grid-template-columns: minmax(0,1.17fr) minmax(0,.83fr);
  align-items: center;
  align-content: center;
  gap: 0;
  padding: 2.5rem var(--page-pad);
}
#top::before {
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 62% 83%, rgba(74,145,122,.14), transparent 48%);
}
.signal-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#top .hero-copy { padding: 0; margin: 0; max-width: 49rem; }
.hero-signature {
  display: flex; align-items: center; gap: .78rem;
  margin: 0 0 1.3rem; color: #bef3dc;
  font: 650 .76rem/1.4 var(--font-display); letter-spacing: .17em; text-transform: uppercase;
}
.hero-signature span { width: 30px; height: 2px; background: #9ce9c8; border-radius: 3px; }
#top h1 { color: #f9faf3; margin: 0; font: 400 clamp(3.2rem, 7.1vw, 7.45rem)/1.06 var(--font-display); letter-spacing: -.077em; white-space: nowrap; }
#top h1 span { font-weight: 550; }
.hero-statement {
  margin: 1.25rem 0 0; max-width: 29ch; text-wrap: pretty;
  color: #d0dedc; font: 400 clamp(1.15rem,2.05vw,2.12rem)/1.4 var(--font-display); letter-spacing: -.035em;
}
#top .hero-actions { display:flex; gap:.75rem; flex-wrap:wrap; margin-top:clamp(1.4rem,3.5vh,2.8rem); }
.home-action {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .92rem;
  padding: .62rem .78rem .62rem 1.2rem; border: 1px solid transparent; border-radius: 999px;
  font: 650 .88rem/1.2 var(--font-display); letter-spacing: -.01em;
  transition: transform .22s, background .22s, box-shadow .22s;
}
.home-action-primary { color: #0a3029; background: #b3f4d8; box-shadow: 0 6px 30px #0c241f38; }
.home-action-secondary { color:#e7f6ef; background:#132e35dd; border-color:#63817c; }
.home-action i { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; font:500 1.05rem/1 var(--font-sans); transition:transform .22s; }
.home-action-primary i { background: #245441; color:white; }
.home-action-secondary i { color: #b9e9d7; }
.home-action:hover { transform: translateY(-2px); box-shadow: 0 5px 23px #8ae1bd29; }
.home-action:hover i { transform: translateX(2px); }
#top .hero-visual {
  width: min(76%, 380px, 54vh) !important; height:auto; aspect-ratio:1; margin:0; transform:none;
  justify-self: center; align-self:center;
}
#top .hero-visual::before {
  inset: -12%; z-index:-1; background: radial-gradient(circle,#aafad62e 42%,transparent 68%);
}
#top .hero-visual::after {
  inset:-5%; border:1px solid #9ed8c935;
  border-top-color:#a6efd6; border-right-color:transparent;
  animation: signal-orbit 14s linear infinite;
}
@keyframes signal-orbit { to { transform: rotate(360deg); } }
#top .portrait-frame { border: 2px solid #c5e6da8f; border-radius:50%; box-shadow:0 0 0 5px #a5efd20a,0 10px 50px #06191d77; animation:none; }
#top .portrait-photo { filter:saturate(.88) contrast(1.02); }
#contacto .contact-content { max-width: 65rem; margin:clamp(1.5rem,6vh,4rem) 0; }
#contacto .contact-link { border-radius:999px; width:fit-content; padding:.55rem 1rem; border:1px solid #a5cbb43e; background:#ffffff08; }
#contacto .contact-orbit { pointer-events:none; }
@media(max-width:1100px) {
  :root { --header-h: 96px; }
  .site-header { grid-template-areas:"brand lang" "links links"; grid-template-columns:1fr auto; grid-template-rows:1fr auto; gap:0; padding-top:.18rem; }
  .site-header .wordmark {grid-area:brand;}
  .site-header .language-toggle {grid-area:lang;}
  .site-header .site-nav {grid-area:links; justify-content:flex-start; padding:0 0 .4rem; overflow-x:auto; scrollbar-width:thin; gap:.2rem;}
  .site-header .site-nav>a {padding:.48rem .72rem;}
}
@media(max-width:700px) {
  #top.hero { grid-template-columns:1fr; justify-items:center; align-content:safe center; padding:clamp(1.4rem,4svh,2.6rem) var(--page-pad); gap:clamp(1.3rem,4svh,2.8rem); }
  #top .hero-copy {text-align:center; order:2; justify-self:center;}
  .hero-signature {justify-content:center; margin:0 0 .7rem; font-size:.65rem;}
  #top h1 {font-size:clamp(2.9rem,10.5vw,4.5rem);}
  .hero-statement {font-size:clamp(1.05rem,4.4vw,1.35rem); margin:.75rem auto 0; max-width:29ch;}
  #top .hero-visual {width:min(49vw,26svh,235px)!important; order:1;}
  #top .hero-actions {justify-content:center; gap:.5rem; margin-top:1.2rem;}
  .home-action {min-height:44px; gap:.5rem; font-size:.81rem; padding:.48rem .65rem .48rem 1rem;}
}
@media(prefers-reduced-motion:reduce) {
 #top .hero-visual::after, #top .hero-visual::before, body.panel-mode #main>section.is-current { animation:none!important; }
 .home-action,.home-action i{transition:none;}
}
#top h1 { word-spacing: .09em; }
@media(max-width:630px) {
  :root { --header-h: 121px; }
  .site-header .site-nav {
    flex-wrap:wrap; overflow:visible; justify-content:center;
    gap:0 .12rem; padding-bottom:.32rem;
  }
  .site-header .site-nav>a { font-size:.75rem; padding:.43rem .62rem; }
  #top .hero-actions {flex-direction:row; align-items:center; justify-content:center;}
}
@media(max-width:355px) {
  .site-header .wordmark-tag,.site-header .wordmark-divider{display:none;}
  .site-header .site-nav>a{padding:.4rem .36rem;}
}

.site-header .language-toggle { justify-self: end; }
