/* Mareas Pro — paleta Ocean Premium (coherente con CommercialTheme.swift) */
:root {
  --bg-0: #0A1F3D;
  --bg-1: #10294E;
  --bg-2: #1F4978;
  --accent: #3DA7F2;
  --accent-soft: rgba(61, 167, 242, 0.16);
  --text-0: #FFFFFF;
  --text-1: #A8C1D9;
  --text-2: #93ABC6;
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.11);
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Gradiente en capa fija propia: background-attachment:fixed en body provoca
   repintados enormes (y capturas en gris) en Chromium con páginas largas. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 130%);
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 22px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-0); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.brand svg { display: block; }
nav.lang { display: flex; gap: 6px; }
nav.lang a {
  color: var(--text-1); text-decoration: none; font-size: .8rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; border: 1px solid transparent;
}
nav.lang a[aria-current="true"] { color: var(--text-0); background: var(--accent-soft); border-color: rgba(61,167,242,.35); }
nav.lang a:hover { color: var(--text-0); }

main { padding: 28px 0 40px; }

.hero { text-align: center; padding: 56px 0 40px; }
.hero .icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 26px; display: block; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.hero p.sub { color: var(--text-1); font-size: clamp(1rem, 2.6vw, 1.2rem); max-width: 34em; margin: 0 auto 30px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); border: 1px solid rgba(61,167,242,.4);
  color: var(--text-0); font-weight: 600; font-size: .95rem;
  padding: 10px 20px; border-radius: 999px;
}
.badge-soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 34px; }
.pills span {
  font-size: .84rem; color: var(--text-1);
  border: 1px solid var(--card-border); background: var(--card);
  padding: 6px 14px; border-radius: 999px;
}

article.doc { padding-top: 8px; }
article.doc h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -0.02em; margin-bottom: 6px; }
article.doc p.updated { color: var(--text-2); font-size: .85rem; margin-bottom: 28px; }
article.doc h2 { font-size: 1.15rem; margin: 30px 0 10px; color: var(--text-0); }
article.doc p, article.doc li { color: var(--text-1); font-size: .97rem; }
article.doc ul { padding-left: 22px; margin: 8px 0; }
article.doc a { color: var(--accent); text-decoration: none; }
article.doc a:hover { text-decoration: underline; }
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px 24px; margin: 16px 0;
}
.card h2 { margin-top: 0 !important; }
.contact-btn {
  display: inline-block; background: var(--accent); color: #06182f !important;
  font-weight: 700; padding: 12px 26px; border-radius: 999px; text-decoration: none !important;
  margin-top: 8px;
}
.contact-btn:hover { filter: brightness(1.08); }

details { border-bottom: 1px solid var(--card-border); padding: 14px 0; }
details:last-of-type { border-bottom: none; }
details summary { cursor: pointer; font-weight: 600; color: var(--text-0); font-size: .98rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; font-weight: 400; flex-shrink: 0; }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; }

footer.site {
  border-top: 1px solid var(--card-border);
  padding: 26px 0 40px; margin-top: 30px;
  color: var(--text-2); font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer.site a { color: var(--text-1); text-decoration: none; }
footer.site a:hover { color: var(--text-0); }

/* ===== Landing ===== */
.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;
}
.wrap.wide { max-width: 1080px; }
header.site.sticky {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 31, 61, 0.72);
  margin: 0 -22px; padding: 14px 22px;
}

.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  align-items: center; padding: 56px 0 40px; text-align: left;
}
.hero-grid h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.025em; margin-bottom: 18px; }
.hero-grid h1 em { font-style: normal; color: var(--accent); }
.hero-grid p.sub { color: var(--text-1); font-size: clamp(1rem, 2.2vw, 1.15rem); margin: 0 0 26px; max-width: 30em; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; padding-top: 36px; }
  .hero-grid p.sub { margin: 0 auto 26px; }
  .hero-grid .pills { justify-content: center; }
}
.hero-grid .pills { justify-content: flex-start; margin-top: 26px; }

.frame {
  position: relative; border-radius: 44px; overflow: hidden;
  border: 7px solid #081527; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  max-width: 340px; margin: 0 auto; background: #081527;
}
.frame img { display: block; width: 100%; height: auto; }
.frame::before {
  content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 26%; height: 22px; border-radius: 999px; background: #081527; z-index: 2;
}
.frame.small { max-width: 300px; }

section.block { padding: 56px 0 12px; }
.kicker {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
section.block > h2, .sec-head h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); letter-spacing: -0.02em; margin-bottom: 10px; }
.sec-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.sec-head p { color: var(--text-1); }

/* Franja de marea viva */
.live-card {
  background: linear-gradient(150deg, rgba(61,167,242,.14), rgba(255,255,255,.04) 60%);
  border: 1px solid rgba(61, 167, 242, 0.32);
  border-radius: 24px; padding: 28px clamp(18px, 4vw, 40px);
}
.live-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.live-top select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.08) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path d="M1 1l5 5 5-5" stroke="white" stroke-width="2" fill="none" stroke-linecap="round"/></svg>') no-repeat right 14px center;
  border: 1px solid var(--card-border); color: var(--text-0);
  font: 600 1rem/1.2 inherit; font-family: inherit;
  padding: 10px 40px 10px 16px; border-radius: 12px; min-width: 220px; max-width: 100%;
}
.live-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.live-main .h { font-size: clamp(3rem, 9vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.live-main .h small { font-size: 45%; font-weight: 600; color: var(--text-1); }
#live-arrow.up { color: #63d8a2; }
#live-arrow.down { color: #F2994A; }
.live-main .state { font-size: 1.15rem; font-weight: 700; }
.live-sub { color: var(--text-1); margin-top: 6px; font-size: 1rem; }
#live-curve { width: 100%; height: auto; margin-top: 18px; display: block; }
#live-events { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#live-events .ev {
  font-size: .88rem; color: var(--text-1); padding: 7px 12px;
  border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--card-border);
}
#live-events .ev b { color: var(--text-0); font-weight: 700; }
#live-events .ev.hi b { color: #F2994A; }
#live-events .ev.lo b { color: var(--accent); }
.live-note { margin-top: 16px; font-size: .8rem; color: var(--text-2); }

/* Bloques de features */
.feat {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px);
  align-items: center; padding: 44px 0;
}
.feat:nth-child(even) .feat-media { order: -1; }
.feat h3 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.feat p { color: var(--text-1); max-width: 30em; }
.feat ul { margin: 14px 0 0; padding: 0; list-style: none; }
.feat li { color: var(--text-1); padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.feat li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
@media (max-width: 780px) {
  .feat { grid-template-columns: 1fr; padding: 30px 0; }
  .feat:nth-child(even) .feat-media { order: 0; }
}

/* Dúo Watch + Live Activity */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 780px) { .duo { grid-template-columns: 1fr; } }
.duo .card { margin: 0; text-align: center; padding: 30px 26px; }
.duo .card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.duo .card p { color: var(--text-1); font-size: .93rem; max-width: 26em; margin: 0 auto; }
/* height:auto es LOAD-BEARING: sin él, el atributo HTML height="496" fija la
   altura y, con width:190px del CSS, la imagen sale estirada (190×496). Con
   height:auto la altura se calcula desde el ancho y se respeta la proporción. */
.duo img.watch { width: 190px; height: auto; max-width: 70%; border-radius: 20px; margin: 20px auto 4px; display: block; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.la-mock {
  margin: 22px auto 6px; max-width: 330px; text-align: left;
  background: rgba(8, 21, 39, 0.92); border: 1px solid var(--card-border);
  border-radius: 22px; padding: 14px 16px;
}
.la-mock .row { display: flex; justify-content: space-between; align-items: baseline; }
.la-mock .big { font-size: 1.5rem; font-weight: 800; }
.la-mock .tag { color: #F2994A; font-weight: 700; font-size: .82rem; }
.la-mock .cd { color: var(--text-1); font-size: .85rem; margin-top: 2px; }
.la-mock .bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.12); margin-top: 12px; overflow: hidden; }
.la-mock .bar i { display: block; height: 100%; width: 62%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #63d8a2); }
.mock-note { font-size: .72rem; color: var(--text-2); margin-top: 10px; text-align: center; }

/* Credibilidad */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 680px) { .stats { grid-template-columns: 1fr; } }
.stat { text-align: center; padding: 24px 16px; }
.stat .n { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); }
.stat .l { color: var(--text-1); font-size: .9rem; margin-top: 4px; }

/* Nube de puertos */
#port-cloud h3 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 26px 0 10px; }
#port-cloud .chips { display: flex; flex-wrap: wrap; gap: 8px; }
#port-cloud button {
  font: 500 .88rem/1.2 inherit; font-family: inherit; cursor: pointer;
  color: var(--text-1); background: var(--card); border: 1px solid var(--card-border);
  padding: 7px 14px; border-radius: 999px; transition: all .15s;
}
#port-cloud button:hover { color: var(--text-0); border-color: rgba(61,167,242,.5); background: var(--accent-soft); }

.cta-final { text-align: center; padding: 70px 0 40px; }
.cta-final h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.cta-final p { color: var(--text-1); max-width: 32em; margin: 0 auto 26px; }

/* ===== Efectos (v3) ===== */

/* Sticky showcase estilo Apple.
   align-items: stretch (por defecto) es LOAD-BEARING: estira la columna del
   iPhone a toda la altura de la fila para que el marco `position: sticky`
   tenga recorrido y se quede fijado mientras pasan los bloques de texto. Con
   `align-items: start` la columna encoge a un móvil y el sticky se despega
   tras el primer bloque (los demás quedan sin imagen). */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: stretch; }
.show-media { position: relative; height: 100%; }
.show-texts .show-text { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.show-text h3 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.show-text p { color: var(--text-1); max-width: 30em; }
.show-text ul { margin: 14px 0 0; padding: 0; list-style: none; }
.show-text li { color: var(--text-1); padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.show-text li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.show-media { position: relative; }
.sticky-frame { position: sticky; top: 10vh; aspect-ratio: 720 / 1561; max-width: 320px; margin: 0 auto; }
.sticky-frame .show-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.sticky-frame .show-img.is-on { opacity: 1; }
.show-mobile { display: none; }
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; }
  .show-media { display: none; }
  .show-texts .show-text { min-height: 0; padding: 26px 0; }
  .show-mobile { display: block; margin-top: 20px; }
}

/* Scroll-reveal */
.fx { opacity: 0; transform: translateY(22px); filter: blur(4px); transition: opacity .7s ease, transform .7s ease, filter .7s ease; }
.fx-in { opacity: 1; transform: none; filter: none; }

/* Velo de profundidad (se oscurece al bajar) */
.depth-veil { position: fixed; inset: 0; background: #061527; opacity: 0; pointer-events: none; z-index: -1; }

/* Capas de olas del hero (parallax) */
.hero-grid { position: relative; }
.sea-layers { position: absolute; left: -10vw; right: -10vw; bottom: -60px; height: 150px; z-index: -1; pointer-events: none; }
.sea-layers .sl { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }

/* Balanceo suave del iPhone del hero (propiedad translate: no choca con el parallax) */
@media (prefers-reduced-motion: no-preference) {
  .hero-grid .frame { animation: bob 7s ease-in-out infinite alternate; }
  @keyframes bob { from { translate: 0 0; } to { translate: 0 -10px; } }
}

/* Buscador de la página FAQ */
.faq-search {
  width: 100%; padding: 13px 18px; border-radius: 14px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,.07);
  color: var(--text-0); font: inherit; margin: 6px 0 18px;
}
.faq-search::placeholder { color: var(--text-2); }
.faq-search:focus { outline: none; border-color: rgba(61,167,242,.55); }

/* Sin movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .fx { opacity: 1; transform: none; filter: none; transition: none; }
  .badge-soon .dot { animation: none; }
  .sticky-frame .show-img { transition: none; }
}

/* ===== Páginas de puerto ===== */
.crumbs { font-size: .85rem; color: var(--text-2); margin-bottom: 14px; }
.crumbs a { color: var(--text-1); text-decoration: none; }
.crumbs a:hover { color: var(--text-0); }
.prose-lead { font-size: 1.02rem; margin: 22px 0 6px; }
.live-h2 { font-size: 1.25rem !important; margin: 4px 0 12px !important; }
article.doc .live-card { margin: 20px 0 8px; }
article.doc .live-card .kicker { margin-bottom: 2px; }
.table-wrap { overflow-x: auto; margin: 10px 0 6px; }
.tides-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tides-table caption { caption-side: bottom; color: var(--text-2); font-size: .78rem; padding: 10px 0; text-align: left; }
.tides-table th, .tides-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--card-border); }
.tides-table thead th { color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.tides-table tbody th { color: var(--text-0); font-weight: 600; white-space: nowrap; width: 1%; }
.tides-table .ev { display: inline-block; margin: 2px 8px 2px 0; color: var(--text-1); }
.tides-table .ev b { color: var(--text-0); font-weight: 700; }
.tides-table .ev.hi b { color: #F2994A; }
.tides-table .ev.lo b { color: var(--accent); }
/* Tablas mensuales enriquecidas (coeficiente + luna) */
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.month-head h2 { margin: 0; }
.print-link {
  font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none;
  border: 1px solid rgba(61,167,242,.4); border-radius: 999px; padding: 6px 14px; white-space: nowrap;
}
.print-link:hover { background: var(--accent-soft); color: var(--text-0); }
.print-link i { font-style: normal; }
.tides-table.month td.mn { white-space: nowrap; color: var(--text-1); }
.tides-table.month td.mn span { color: var(--text-2); font-size: .82rem; }
.co-pill {
  display: inline-block; min-width: 30px; text-align: center; font-weight: 700; font-size: .82rem;
  padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.co-pill.viva { background: #0891b2; color: #fff; }
.co-pill.media { background: rgba(255,255,255,.08); color: var(--text-0); border: 1px solid var(--card-border); }
.co-pill.muerta { background: rgba(10,31,61,.55); color: var(--text-1); border: 1px solid var(--card-border); }
.nearby { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.nearby a {
  color: var(--text-1); text-decoration: none; font-size: .9rem;
  background: var(--card); border: 1px solid var(--card-border);
  padding: 8px 14px; border-radius: 999px; transition: all .15s;
}
.nearby a:hover { color: var(--text-0); border-color: rgba(61,167,242,.5); background: var(--accent-soft); }
.nearby a small { color: var(--text-2); }
/* Índice de puertos del hub (tabla por país) */
.port-index { width: 100%; border-collapse: collapse; font-size: .95rem; }
.port-index thead th { color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--card-border); }
.port-index tbody th { text-align: left; font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--card-border); }
.port-index tbody td { color: var(--text-1); padding: 9px 12px; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
.port-index tbody th a { color: var(--accent); text-decoration: none; }
.port-index tbody th a:hover { text-decoration: underline; }
.port-index tbody tr:hover td, .port-index tbody tr:hover th { background: rgba(255,255,255,.03); }
/* Sobre Natural Apps + Equipo */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 780px) { .apps-grid { grid-template-columns: 1fr; } }
a.app-mini { display: block; text-decoration: none; color: var(--text-0); margin: 0; transition: transform .15s, border-color .15s; }
a.app-mini:hover { transform: translateY(-2px); border-color: rgba(61,167,242,.5); }
.app-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; font-weight: 800; font-size: 1rem;
  background: linear-gradient(135deg, #46abf4, #1c6fc0); color: #fff; margin-bottom: 12px;
}
.app-mini h3 { font-size: 1.05rem; margin-bottom: 4px; }
.app-mini p { color: var(--text-1); font-size: .88rem; margin: 0; }
.origin { max-width: 760px; margin: 26px auto 6px; }
.origin h3 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 6px 0 10px; }
.origin p { color: var(--text-1); font-size: .97rem; }
.origin p + p { margin-top: 12px; }

.team-head { text-align: center; margin: 44px 0 18px; }
.team-head h3 { font-size: 1.2rem; }
.team-head p { color: var(--text-2); font-size: .88rem; }
.team-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.team-card { text-align: center; width: 200px; margin: 0; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 4px auto 12px;
  background: var(--accent-soft); border: 2px dashed rgba(61,167,242,.45);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.7rem;
}
.t-name { font-weight: 700; }
.t-role { color: var(--text-2); font-size: .85rem; }

.cta-port { text-align: center; margin-top: 30px !important; }
.cta-port .badge-soon { margin-top: 14px; }
#port-cloud a {
  display: inline-block; font: 500 .88rem/1.2 inherit; text-decoration: none;
  color: var(--text-1); background: var(--card); border: 1px solid var(--card-border);
  padding: 7px 14px; border-radius: 999px; transition: all .15s;
}
#port-cloud a:hover { color: var(--text-0); border-color: rgba(61,167,242,.5); background: var(--accent-soft); }
