/* Chuo Web – KP4EOP. One small stylesheet, system fonts, no frameworks. */
:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --sky: #1d6fd6;
  --sky-soft: #e8f1fc;
  --amber: #f2b632;
  --ink: #16202e;
  --muted: #55627a;
  --line: #dde4ee;
  --paper: #ffffff;
  --tint: #f4f7fb;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--sky); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); margin-bottom: .6em; }
.section-dark .eyebrow, .hero .eyebrow { color: var(--amber); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 31, 58, .96); backdrop-filter: blur(8px); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; }
.call { font-family: var(--mono); font-size: .78rem; color: var(--amber); letter-spacing: .08em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: #dbe6f5; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav .nav-cta { background: var(--amber); color: var(--navy); font-weight: 700; margin-left: 6px; }
.site-nav .nav-cta:hover { background: #ffc94f; color: var(--navy); }
.site-nav { margin-left: auto; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .4); color: #fff; padding: 8px 14px; border-radius: 8px; font: inherit; }
.header-tools { display: flex; align-items: center; gap: 10px; flex: none; }

/* ES / EN switch */
.lang-switch { display: inline-flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 2px; }
.lang-switch a { color: #dbe6f5; text-decoration: none; font-size: .76rem; font-weight: 700; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; line-height: 1.2; }
.lang-switch a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lang-switch a[aria-current] { background: #fff; color: var(--navy); }

/* Hero */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 31, 58, .94) 0%, rgba(11, 31, 58, .8) 38%, rgba(11, 31, 58, .15) 72%, rgba(11, 31, 58, 0) 100%); }
.hero-inner { position: relative; z-index: 1; padding: clamp(64px, 11vw, 140px) 0; }
.hero-inner > * { max-width: 560px; }
.hero h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.6rem); margin-bottom: .4em; }
.hero h1 span { display: block; color: var(--amber); }
.lead { font-size: 1.12rem; color: #dbe6f5; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: #185fba; }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: #ffc94f; }

/* Status bar */
.statusbar { background: var(--navy-2); color: #fff; border-top: 1px solid rgba(255, 255, 255, .12); }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.status { padding: 16px 18px; border-left: 1px solid rgba(255, 255, 255, .12); }
.status:first-child { border-left: 0; padding-left: 0; }
.status .k { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #9fb6d6; }
.status .v { font-size: 1.1rem; font-weight: 600; }
.status .mono { color: var(--amber); font-size: 1.25rem; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--navy); color: #e6edf7; }
.section-dark h2 { color: #fff; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.two-col-photo { grid-template-columns: 1.35fr .65fr; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }
.caption { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.fineprint { font-size: .92rem; color: #b5c5dc; }

.gear { list-style: none; padding: 0; margin: 1.4em 0; border-top: 1px solid var(--line); }
.gear li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.gear span { font-weight: 400; color: var(--muted); }

/* Click-to-load YouTube: no player code is downloaded until the visitor presses play */
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.yt:hover img { transform: scale(1.03); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgba(11, 31, 58, .88); border: 2px solid #fff; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 20px; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }

/* Repeater */
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); overflow: hidden; margin: 1.6em 0; }
.specs div { background: var(--navy); padding: 14px 16px; }
.specs dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #9fb6d6; }
.specs dd { margin: 2px 0 0; font-weight: 600; color: #fff; }
.specs .mono { color: var(--amber); font-size: 1.1rem; }
.photo-frame { margin: 0; }
.photo-frame img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .yt { border-radius: 0; }
.card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 18px 20px 20px; }
.card-body p:last-child { margin: 0; color: var(--muted); font-size: .96rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sky); background: var(--sky-soft); padding: 3px 9px; border-radius: 99px; margin-bottom: .7em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .g-wide { grid-column: span 2; grid-row: span 2; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; color: #fff; font-size: .88rem; background: linear-gradient(transparent, rgba(11, 31, 58, .85)); }

/* Inner pages */
.page-head { background: var(--navy); color: #fff; padding: clamp(40px, 7vw, 80px) 0; }
.page-head h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); }
.page-head .lead { max-width: 720px; }
.page-head .lead:last-child { margin-bottom: 0; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--amber); border-radius: 0; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.photos a { position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.photos a:hover img { transform: scale(1.04); }
.photos span { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; font-size: .86rem; background: linear-gradient(transparent, rgba(11, 31, 58, .88)); }

.page-head .eyebrow { color: var(--amber); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--sky); text-decoration: underline; }

/* Long-form text (archive write-ups) */
.prose { max-width: 720px; margin-bottom: 28px; }
.photos + .prose { margin-top: 32px; margin-bottom: 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--amber); color: var(--muted); font-style: italic; }
.prose blockquote footer { font-style: normal; font-weight: 700; color: var(--ink); }

.lightbox { border: 0; padding: 0; background: var(--navy); color: #fff; border-radius: var(--radius); max-width: min(1100px, 94vw); overflow: hidden; }
.lightbox::backdrop { background: rgba(7, 21, 40, .85); }
.lightbox img { max-height: 78vh; width: auto; max-width: 100%; margin: auto; }
.lightbox p { margin: 0; padding: 12px 90px 14px 16px; font-size: .95rem; }
.lightbox button { position: absolute; right: 10px; bottom: 8px; background: var(--amber); color: var(--navy); border: 0; border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }

.solar { display: block; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.solar img { margin: auto; }

/* Contact */
.about { display: flex; gap: 22px; align-items: center; }
.about img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--amber); background: #fff; flex: none; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--navy-2); padding: 24px; border-radius: var(--radius); }
.form label { display: block; font-size: .88rem; font-weight: 600; color: #cfdcee; }
.form .full { grid-column: 1 / -1; }
.form .opt { font-weight: 400; color: #9fb6d6; }
.form input, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: #fff; color: var(--ink); font: inherit; }

.site-footer { background: #071528; color: #9fb6d6; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: #fff; }

/* Tablet and phone */
@media (max-width: 900px) {
  .two-col, .two-col-photo { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .status { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .status:nth-child(-n+2) { border-top: 0; }
  .photo-frame { max-width: 320px; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--navy); padding: 8px 16px 16px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav { margin-left: 0; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-img { position: static; aspect-ratio: 16 / 9; object-position: center; }
  .hero::after { display: none; }
  .hero-inner { padding: 28px 0 40px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr; padding: 18px; }
  .about { flex-direction: column; align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .gear li { grid-template-columns: 110px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .yt img { transition: none; }
}

/* ---------- WordPress content (pages and posts edited in the block editor) ---------- */
.entry > :not(.band) { width: min(760px, 100% - 32px); margin-inline: auto; }
.entry > :not(.band):first-child { margin-top: clamp(40px, 6vw, 72px); }
.entry > :not(.band):last-child { margin-bottom: clamp(40px, 6vw, 72px); }
.entry-post > .video, .entry-post > .photos { width: min(900px, 100% - 32px); margin-block: 28px; }

/* Full-width bands: a Group block with the class "band", plus "band-tint" or "band-dark" */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.band > * { width: min(1120px, 100% - 32px); margin-inline: auto; }
.band > .wp-block-group__inner-container > :first-child, .band > :first-child { margin-top: 0; }
.band-tint { background: var(--tint); }
.band-dark { background: var(--navy); color: #e6edf7; }
.band-dark h2 { color: #fff; }
.band-dark .eyebrow { color: var(--amber); }
.band h2 { margin-bottom: 28px; }
.band .eyebrow + h2 { margin-top: 0; }

.wp-block-columns { display: flex; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: 0; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column h2 { margin-bottom: .5em; }
.video .caption { margin-bottom: 0; }

.wp-block-quote { margin: 1.2em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--amber); color: var(--muted); font-style: italic; }
.wp-block-quote cite { font-style: normal; font-weight: 700; color: var(--ink); }
.prose + .photos, .photos + .prose { margin-top: 32px; }
.photos img { height: 100%; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.section-tint .post-nav { margin-top: 0; }
.post-nav a { font-weight: 700; text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }

.form .hp { position: absolute; left: -9999px; }
.form-note { margin: 0; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.form-ok { background: #d8f3dc; color: #14532d; }
.form-error { background: #fde2e1; color: #7f1d1d; }

@media (max-width: 780px) {
  .wp-block-columns { flex-direction: column; align-items: stretch; }
}
