:root {
  --navy: #0a2a4a;
  --navy-2: #123d66;
  --red: #c8102e;
  --ink: #14212e;
  --steel: #46586b;
  --mist: #eef2f6;
  --mist-2: #dde5ee;
  --white: #ffffff;
  --line: #cfd9e3;
  --radius: 6px;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 3px; }

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.7rem, 6.4vw, 4.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.brand { font-family: var(--display); font-size: 1.9rem; color: var(--navy); text-decoration: none; line-height: 1; display: inline-flex; align-items: baseline; gap: 2px; }
.brand b { font-weight: 400; color: var(--red); }
.nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--navy); border-bottom-color: var(--red); }
.nav a[aria-current="page"] { border-bottom-color: var(--navy); }
.nav .btn { border-bottom: 0; padding: 9px 16px; color: var(--white); }
.nav .btn:hover { color: var(--white); }

/* buttons */
.btn { display: inline-block; background: var(--navy); color: var(--white); text-decoration: none; font-weight: 600; padding: 13px 24px; border-radius: var(--radius); border: 0; cursor: pointer; font-family: var(--body); font-size: 1rem; transition: background .15s; }
.btn:hover { background: var(--red); color: var(--white); }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.btn[aria-disabled="true"] { background: var(--mist-2); color: var(--steel); cursor: default; }

/* hero */
.hero { background: var(--mist); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 104px); }
.hero p.lead { font-size: 1.25rem; color: var(--steel); max-width: 34ch; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.map { width: 100%; height: auto; }
.map .land { stroke: var(--mist-2); }
.map .canal { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; fill: none; }
.map .dot { fill: var(--navy); }
.map .dot.red { fill: var(--red); }
.map text { font-family: var(--body); font-size: 13px; fill: var(--ink); font-weight: 600; }
.map .note { font-weight: 400; fill: var(--steel); font-size: 11px; }
.map .sea { font-family: var(--display); font-size: 17px; fill: #8da0b4; font-weight: 400; font-style: italic; }

/* sections */
section.block { padding-block: clamp(48px, 7vw, 88px); }
section.block.alt { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: 36px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--navy); }
.pillar { padding: 28px 28px 32px 0; border-right: 1px solid var(--line); }
.pillar + .pillar { padding-left: 28px; }
.pillar:last-child { border-right: 0; }
.pillar p { color: var(--steel); }
.pillar a { font-weight: 600; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; margin: 0; padding: 0; list-style: none; }
.facts li { padding-top: 14px; border-top: 1px solid var(--line); }
.facts strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--navy); line-height: 1.2; }
.facts span { color: var(--steel); }

.cta-band { background: var(--navy); color: var(--white); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 52px; }
.cta-band h2 { color: var(--white); margin: 0; max-width: 18ch; }
.cta-band .btn { background: var(--white); color: var(--navy); }
.cta-band .btn:hover { background: var(--red); color: var(--white); }

/* services */
.service { display: grid; grid-template-columns: 280px 1fr; gap: 24px 56px; padding-block: 40px; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 2px solid var(--navy); }
.service h2 { font-size: 2.2rem; }
.service .tag { color: var(--steel); }
.offers { list-style: none; margin: 0; padding: 0; }
.offers li { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.offers li:last-child { border-bottom: 0; }
.offers h3 { font-size: 1.35rem; margin: 0 0 4px; }
.offers p { margin: 0; color: var(--steel); }
.status { font-size: .9rem; color: var(--steel); white-space: nowrap; }
.soon { background: var(--mist); padding: 28px; border-radius: var(--radius); }

/* about / contact */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; padding-block: clamp(40px, 6vw, 80px); }
.portrait { position: relative; aspect-ratio: 4 / 5; background: var(--navy); border-radius: var(--radius); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait img[hidden] { display: none; }
.portrait .initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 6rem; color: var(--white); }
.portrait img + .initials { display: none; }
.portrait img[hidden] + .initials { display: grid; }
.cv { list-style: none; padding: 0; margin: 28px 0 0; }
.cv li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--steel); }
.cv li strong { color: var(--ink); font-weight: 600; }

form.contact { display: grid; gap: 18px; max-width: 560px; }
label { font-weight: 600; font-size: .95rem; display: grid; gap: 6px; }
input, select, textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--steel); border-radius: var(--radius); background: var(--white); color: var(--ink); width: 100%; }
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .92rem; color: var(--steel); }
#form-status { font-weight: 600; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; }
.contact-lines { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-lines li { padding: 12px 0; border-top: 1px solid var(--line); }
.contact-lines span { display: block; color: var(--steel); font-size: .9rem; }

/* footer */
.site-footer { background: var(--ink); color: #c3cfdb; font-size: .93rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; padding-block: 44px; }
.site-footer a { color: #e8eef4; }
.site-footer p { max-width: 70ch; margin: 0 0 .6em; }
.site-footer .brand { color: var(--white); font-size: 1.6rem; margin-bottom: 8px; }

@media (max-width: 860px) {
  .hero .wrap, .split, .service, .site-footer .wrap { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr; }
  .offers li { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; }
}

/* retiree page */
.plain { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .97rem; }
.plain th, .plain td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plain th { color: var(--navy); border-bottom: 2px solid var(--navy); }
.steps { margin: 0; padding-left: 1.2em; }
.steps li { margin-bottom: 14px; }
@media (max-width: 720px) { .plain { font-size: .9rem; } }

/* el valle */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 40px; }
.photo-slot { margin: 0; aspect-ratio: 4 / 3; background: var(--mist); border: 1px dashed var(--steel); border-radius: var(--radius); display: grid; place-items: center; color: var(--steel); font-size: .9rem; text-align: center; padding: 12px; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* dropdown nav + destinations */
.dd { position: relative; }
.dd-menu { display: none; position: absolute; top: 100%; left: -12px; min-width: 230px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; margin: 0; list-style: none; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { display: block; }
.dd-menu a { display: block; padding: 9px 18px; border-bottom: 0; }
.dd-menu a:hover { background: var(--mist); }
@media (max-width: 860px) { .dd-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0; } .dd-menu a { padding: 4px 0; font-size: .9rem; } }
.dest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dest { text-decoration: none; color: var(--ink); display: block; }
.dest .photo-slot { margin-bottom: 14px; }
.dest h3 { margin: 0 0 6px; color: var(--navy); }
.dest .more { color: var(--red); font-weight: 600; }
.dest:hover h3 { text-decoration: underline; }
@media (max-width: 720px) { .dest-grid { grid-template-columns: 1fr; } }
.real-map { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.facts li { margin-bottom: 8px; }

/* featured property */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 40px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photos figcaption { font-size: .85rem; color: var(--steel); margin-top: 6px; }
.photos .wide { grid-column: span 2; }
.photos .wide img { aspect-ratio: 16 / 9; }
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; background: var(--mist); border-radius: var(--radius); padding: 20px; }
.feature img { width: 100%; border-radius: var(--radius); }
.feature h3 { margin-top: 0; }
@media (max-width: 720px) { .photos, .feature { grid-template-columns: 1fr; } .photos .wide { grid-column: auto; } }

/* contact form fields */
form.contact .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.phone-field > label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 6px; }
.phone-row { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: 10px; }
@media (max-width: 560px) { form.contact .two, .phone-row { grid-template-columns: 1fr; } }

/* nested flyout menus under Invest in Panama */
.dd-menu li.sub { position: relative; }
.dd-menu li.sub > a::after { content: "\203A"; float: right; margin-left: 16px; color: var(--steel); }
.dd-sub { display: none; position: absolute; left: 100%; top: -9px; min-width: 260px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; margin: 0; list-style: none; z-index: 40; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.dd-menu li.sub:hover > .dd-sub, .dd-menu li.sub:focus-within > .dd-sub { display: block; }
.dd-sub .info { padding: 10px 18px; font-size: .85rem; line-height: 1.45; color: var(--steel); border-bottom: 1px solid var(--line); max-width: 280px; }
@media (max-width: 860px) { .dd-menu li.sub > a::after { content: none; } .dd-sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0; } .dd-sub a { padding: 4px 0; font-size: .9rem; } .dd-sub .info { padding: 4px 0; max-width: none; border: 0; } }

/* header cleanup */
.site-header .wrap { width: min(1240px, 100% - 40px); padding-block: 18px; gap: 12px 24px; }
.nav { gap: 4px 24px; }
.dd { display: flex; align-items: center; }
.nav > a, .nav .dd > a { line-height: 1.4; }
.nav .btn { padding: 10px 22px; margin-left: 4px; }

/* page photos */
.hero-photo { margin: 0 0 40px; }
.hero-photo img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.hero-photo figcaption { font-size: .85rem; color: var(--steel); margin-top: 8px; }

/* real photo galleries */
.gallery.photos-real { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery.photos-real figure img, .inline-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery.photos-real figcaption, .inline-photo figcaption, .dest-credit { font-size: .8rem; color: var(--steel); margin-top: 6px; line-height: 1.4; }
.gallery.photos-real figcaption a, .hero-photo figcaption a, .inline-photo figcaption a { color: var(--steel); }
.inline-photo { margin: 0 0 24px; max-width: 640px; }
.dest-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 6px; }
.dest-credit { display: block; margin-bottom: 12px; }

/* centered header: logo left, links centered, Contact right */
.site-header .wrap { width: min(1120px, 100% - 40px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-block: 16px; gap: 12px 24px; }
.site-header .brand { justify-self: start; }
.site-header .nav { justify-content: center; flex-wrap: nowrap; gap: 4px 26px; }
.nav > a, .nav .dd > a { white-space: nowrap; }
.nav-cta { justify-self: end; padding: 10px 24px; }
@media (max-width: 1000px) { .site-header .wrap { grid-template-columns: 1fr; justify-items: center; } .site-header .brand, .nav-cta { justify-self: center; } .site-header .nav { flex-wrap: wrap; } }

/* photo spacing fixes */
.gallery.photos-real figure, .hero-photo, .inline-photo { margin-left: 0; margin-right: 0; }
.gallery.photos-real figure { margin-top: 0; margin-bottom: 0; }
.hero-photo img { aspect-ratio: 20 / 9; object-fit: cover; }

/* mobile menu button */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }
@media (max-width: 860px) {
  .site-header .wrap { grid-template-columns: 1fr auto; justify-items: stretch; }
  .nav-burger { display: inline-block; justify-self: end; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; font-size: .95rem; cursor: pointer; color: var(--navy); }
  .nav-toggle:focus-visible + .nav-burger { outline: 3px solid var(--red); outline-offset: 2px; }
  .site-header .nav, .site-header .nav-cta { display: none; grid-column: 1 / -1; }
  .nav-toggle:checked ~ .nav { display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 6px; max-height: calc(100vh - 150px); overflow-y: auto; padding-bottom: 8px; }
  .nav-toggle:checked ~ .nav-cta { display: inline-block; justify-self: start; }
  .dd { display: block; width: 100%; }
}

/* legal pages */
.prose { padding-block: clamp(40px, 6vw, 80px); }
.prose > * { max-width: 780px; }
.prose h1 { margin-bottom: .3em; }
.prose .eff { color: var(--steel); }
.prose h2 { font-size: 1.7rem; margin: 1.6em 0 .4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .6em; }
.site-footer p a { text-underline-offset: 3px; }

/* four pillars and larger menu text */
.pillars { grid-template-columns: repeat(4, 1fr); }
.pillar { padding-right: 22px; }
.pillar + .pillar { padding-left: 22px; }
.nav a { font-size: 1.02rem; }
.site-header .wrap { width: min(1280px, 100% - 40px); }
.site-header .nav { gap: 4px 22px; }
.nav .dd-menu a, .dd-sub a { font-size: .95rem; }
@media (max-width: 1100px) { .pillars { grid-template-columns: repeat(2, 1fr); } .pillar, .pillar + .pillar { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 22px 24px 0; } }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* contact page photo */
.contact-photo { margin: 0 0 8px; }
.contact-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% center; border-radius: var(--radius); display: block; }
.contact-photo figcaption { font-size: .8rem; color: var(--steel); margin-top: 6px; line-height: 1.4; }
.contact-photo figcaption a { color: var(--steel); }

/* own photos */
.fish-gallery { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.gallery.photos-real img { aspect-ratio: 4 / 3; }

/* destination cards: same layout whether or not a photo credit is shown */
.dest { display: flex; flex-direction: column; }
.dest .dest-img { margin-bottom: 14px; }
.dest p { flex: 1; }
.dest .dest-credit { display: block; margin: 12px 0 0; font-size: .8rem; color: var(--steel); line-height: 1.4; }
.dest { position: relative; padding-bottom: 2.6rem; }
.dest .dest-credit { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; }
