/* Habla House — static site styles */
:root {
  --ink: #2a1d17;
  --muted: #6b5a50;
  --bg: #fbf7f2;
  --surface: #ffffff;
  --sand: #f3e9dd;
  --line: #e7d9c8;
  --brand: #b4532a;
  --brand-dark: #8a3c1b;
  --sun: #f4c542;
  --red: #e2392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(42 29 23 / .06), 0 8px 24px rgb(42 29 23 / .08);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 17px/1.65 var(--sans);
  color: var(--ink);
  background: var(--bg);
  text-wrap: pretty;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: .18em; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--ink); color: #f6ede3; }
.section--dark a:not(.btn) { color: var(--sun); }
.eyebrow {
  display: inline-block; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--sun); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lead { margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: #fff; font: 600 1rem/1.1 var(--sans); text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-dark); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--light { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(251 247 242 / .94); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand span { font: 700 1.3rem/1 var(--serif); }
.brand small { display: block; font: 500 .72rem/1.3 var(--sans); color: var(--muted); letter-spacing: .04em; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-dark); background: var(--sand); }
.nav .has-sub { position: relative; }
.nav .has-sub > a::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav .sub {
  position: absolute; left: 0; top: 100%; min-width: 250px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { font-weight: 400; }
.nav .sub small { color: var(--muted); }
.nav .nav-cta { margin-left: 8px; }
.nav .nav-cta a { background: var(--brand); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.nav .nav-cta a:hover { background: var(--brand-dark); color: #fff; }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-block; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav { flex-basis: 100%; }
  .js .nav { display: none; }
  .js .nav.open { display: block; max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
  .nav > ul { flex-direction: column; align-items: stretch; padding-bottom: 16px; gap: 0; }
  .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; background: none; }
  .nav .has-sub > a::after { display: none; }
  .nav .nav-cta { margin: 10px 0 0; }
  .nav .nav-cta a { text-align: center; }
}

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 span { color: var(--brand); }
.hero-media { position: relative; }
.hero-media img { border-radius: 200px 200px var(--radius) var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.hero-badge {
  position: absolute; left: -24px; bottom: 32px; background: var(--surface); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; max-width: 280px;
}
.hero-badge img { width: 44px; height: 44px; border-radius: 0; aspect-ratio: auto; box-shadow: none; }
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.hero-badge span { font-size: .85rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.chips li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 6px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; }
  .hero-badge { left: 12px; }
}

/* Page banner */
.page-banner { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.page-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.page-banner .wrap { position: relative; padding-block: clamp(64px, 10vw, 120px); }
.page-banner h1 { margin: 0; }
.page-banner .eyebrow { color: var(--sun); }
.page-banner p { margin: 12px 0 0; font-size: 1.15rem; max-width: 60ch; color: #f6ede3; }
.crumbs { font-size: .9rem; margin-bottom: 10px; color: #f1e4d6; }
.crumbs a { color: #fff; }

/* Grids & cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card > img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p:last-child { margin-bottom: 0; }
.card .more { margin-top: auto; padding-top: 12px; font-weight: 600; }
a.card { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
a.card:hover .more { color: var(--brand); }

.tile { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 340px; display: flex; align-items: flex-end; text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(30 18 12 / .88) 10%, rgb(30 18 12 / .15) 70%); }
.tile:hover img { transform: scale(1.04); }
.tile-body { position: relative; z-index: 1; padding: 26px; }
.tile-body h3 { font-size: 1.5rem; margin-bottom: 6px; }
.tile-body p { margin: 0 0 12px; color: #f3e6d8; }
.tile-body .more { color: var(--sun); font-weight: 600; }

/* Course cards */
.course-card .level {
  align-self: flex-start; font: 700 .8rem/1 var(--sans); letter-spacing: .06em;
  background: var(--sand); color: var(--brand-dark); border-radius: 999px; padding: 6px 10px; margin-bottom: 12px;
}
.course-card h3 { margin-bottom: 8px; }
.course-card p { color: var(--muted); font-size: .97rem; }

/* Split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--top { align-items: start; }
.split img.rounded { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding-left: 1.8em; position: relative; margin-bottom: .45em; }
.ticks li::before { content: "🏅"; position: absolute; left: 0; }
.topics { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics li { background: var(--sand); border-radius: 999px; padding: 6px 14px; font-size: .95rem; }

/* Credentials */
.creds { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cred { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cred a.zoom { display: block; background: #fff; border-bottom: 1px solid var(--line); cursor: zoom-in; }
.cred img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; }
.cred figcaption { padding: 16px 20px 20px; }
.cred figcaption strong { display: block; font-family: var(--serif); font-size: 1.08rem; line-height: 1.3; margin-bottom: 4px; }
.cred figcaption span { color: var(--muted); font-size: .93rem; }
.cred-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 32px; }
.cred-strip a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: block; }
.cred-strip img { aspect-ratio: 4 / 3; object-fit: contain; width: 100%; }
@media (max-width: 720px) { .cred-strip { grid-template-columns: repeat(2, 1fr); } }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgb(20 12 8 / .85); }
dialog.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: 8px; background: #fff; }
dialog.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
dialog.lightbox button {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* Testimonials */
.quotes { columns: 3 300px; column-gap: 24px; }
.quote { break-inside: avoid; margin: 0 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.quote .stars { color: #e0a100; letter-spacing: 2px; font-size: .95rem; }
.quote blockquote { margin: 8px 0 14px; font-size: 1.02rem; }
.quote figcaption { font-weight: 600; font-family: var(--serif); }
.section--sand .quote { border-color: transparent; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 20px 56px 20px 24px; font: 600 1.12rem/1.35 var(--serif); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font: 400 1.6rem var(--sans); color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 24px 20px; color: var(--muted); }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--sand); display: grid; place-items: center; color: var(--brand-dark); }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list small { display: block; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.contact-list a, .contact-list b { font-size: 1.1rem; font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-list a:hover { color: var(--brand); text-decoration: underline; }
.section--dark .contact-list .ico { background: rgb(255 255 255 / .08); color: var(--sun); }
.section--dark .contact-list a, .section--dark .contact-list b { color: #fff; }
.section--dark .contact-list small { color: #cbb8a6; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.form input:user-invalid, .form textarea:user-invalid { border-color: var(--red); }
.form .note { font-size: .88rem; color: var(--muted); margin: 0; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* Course page */
.course-hero { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.course-hero .level-img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 800px) { .course-hero { grid-template-columns: 1fr; } .course-hero .level-img { max-width: 300px; } }
.format .num { font: 700 2.2rem/1 var(--serif); color: var(--brand); margin-bottom: 10px; }
.highlights figure { margin: 0; }
.highlights img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; background: #fff; }
.highlights figcaption { margin-top: 10px; color: var(--muted); font-size: .97rem; }
.pdf-link { display: inline-block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); max-width: 420px; }
.course-nav { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 700px) {
  .course-nav { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: thin; }
  .course-nav a { flex: none; }
}
.course-nav a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); }
.course-nav a[aria-current="page"], .course-nav a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: calc(var(--radius) + 6px); padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #fbe9dc; }

/* Footer */
.site-footer { background: var(--ink); color: #e9dccf; padding-top: 64px; font-size: .97rem; }
.site-footer a:not(.btn) { color: #fff; }
.site-footer h2 { font-size: 1.15rem; color: #fff; margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid ul a { text-decoration: none; color: #e9dccf; }
.footer-grid ul a:hover { color: var(--sun); text-decoration: underline; }
.footer-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand strong { font: 700 1.35rem var(--serif); color: #fff; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 48px; padding-block: 22px; font-size: .88rem; color: #bba895; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 24px; }
