/*
 * GHI public site — the apex domain's front page.
 *
 * A deliberately separate surface from the Harmonica app (app.<domain>):
 * its own fonts (Cormorant Garamond for display, Manrope for text), its own
 * navy/gold palette, no framework. The app's "Inter only" rule does not
 * apply here, and nothing here may be imported into the app.
 *
 * Ported from the client's design prototype; class names match it so the two
 * can be compared side by side.
 */
:root {
  --background: oklch(0.99 0.002 240);
  --foreground: oklch(0.25 0.025 251);
  --primary: oklch(0.235 0.038 254);
  --primary-foreground: oklch(0.99 0.002 240);
  --secondary: oklch(0.958 0.003 240);
  --muted-foreground: oklch(0.52 0.016 251);
  --accent: oklch(0.72 0.062 83);
  --border: oklch(0.87 0.006 240);
  --destructive: oklch(0.55 0.2 27);
  --on-dark-muted: oklch(0.8 0.009 240);
  --dark-line: oklch(0.99 0 0 / 19%);
  --hero-shade:
    linear-gradient(96deg, oklch(0.19 0.032 253 / 90%) 0%, oklch(0.2 0.032 253 / 78%) 30%, oklch(0.24 0.03 253 / 44%) 58%, oklch(0.3 0.025 253 / 16%) 82%, oklch(0.34 0.02 253 / 6%) 100%),
    linear-gradient(0deg, oklch(0.16 0.03 253 / 84%) 0%, oklch(0.18 0.03 253 / 52%) 20%, oklch(0.19 0.03 253 / 0%) 52%);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--primary); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-width { max-width: 1320px; margin-inline: auto; padding-inline: 64px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border-radius: 2px; font-weight: 500; transition: background-color .2s, color .2s, opacity .2s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-hero { height: 40px; padding-inline: 32px; font-size: 14px; background: var(--primary-foreground); color: var(--primary); }
.btn-hero:hover { background: oklch(0.99 0.002 240 / 88%); }
.btn-outline { height: 32px; padding-inline: 12px; font-size: 12px; border: 1px solid oklch(0.99 0.002 240 / 40%); color: var(--primary-foreground); }
.btn-outline:hover { background: oklch(0.99 0.002 240 / 12%); }
.btn-primary { height: 40px; padding-inline: 32px; font-size: 14px; background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: oklch(0.235 0.038 254 / 90%); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Header */
.site-header { height: 98px; background: var(--primary); color: var(--primary-foreground); border-bottom: 1px solid var(--dark-line); position: relative; z-index: 20; }
.header-inner { height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.brand-wrap { display: flex; align-items: center; }
.brand-mark { width: 27px; height: 27px; display: block; flex: none; }

.lang-switch { display: inline-flex; gap: 2px; font-size: 11px; letter-spacing: .14em; }
.lang-switch button { padding: 4px 6px; opacity: .55; transition: opacity .2s; }
.lang-switch button:hover, .lang-switch button[aria-pressed="true"] { opacity: 1; }
.lang-switch button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 560px; color: var(--primary-foreground); background: var(--primary); overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-shade); }
.hero h1, .hero-description { text-shadow: 0 1px 22px oklch(0.15 0.03 253 / 55%); }
.hero-content { position: relative; z-index: 1; padding-top: 56px; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: 72px; line-height: 1.04; max-width: 650px; margin: 12px 0 23px; }
.hero h1 em { font-weight: 400; }
.hero-description { font-size: 13px; line-height: 1.9; color: oklch(0.93 0.006 240 / 92%); max-width: 415px; }
.hero-actions { display: flex; gap: 28px; align-items: center; margin-top: 32px; }
.hero-role { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--dark-line); font-family: var(--font-display); font-size: 19px; line-height: 1.5; max-width: 460px; color: oklch(0.9 0.007 240 / 84%); }

/* Contact band over the Engadin panorama */
.cta { background: var(--primary); color: var(--primary-foreground); }
.cta-scene { position: relative; background-size: cover; background-position: center; background-attachment: fixed; }
.cta-scene::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, oklch(0.16 0.03 253 / 74%) 0%, oklch(0.16 0.03 253 / 60%) 100%); }
.cta-scene .site-width { position: relative; z-index: 1; min-height: 62vh; display: flex; align-items: center; padding-block: 70px; }
.cta h2 { font-family: var(--font-display); font-size: 39px; line-height: 1.15; font-weight: 400; text-shadow: 0 1px 18px oklch(0.15 0.03 253 / 55%); }
.cta p { margin-top: 12px; font-size: 12px; color: oklch(0.93 0.006 240 / 92%); text-shadow: 0 1px 12px oklch(0.15 0.03 253 / 55%); }

/* Footer */
.site-footer { background: var(--primary); color: var(--on-dark-muted); border-top: 1px solid var(--dark-line); padding-block: 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 22px; font-size: 10px; }
.footer-links { display: flex; gap: 25px; align-items: center; }
.footer-links a:hover { color: var(--primary-foreground); }

/* Inner pages */
.eyebrow { font-size: 10px; text-transform: uppercase; display: flex; align-items: center; gap: 13px; font-weight: 500; }
.eyebrow::before { content: ""; display: block; width: 28px; height: 1px; background: var(--accent); }
.page-intro { background: var(--primary); color: var(--primary-foreground); padding-block: 70px 77px; }
.page-intro h1 { font-family: var(--font-display); font-size: 60px; line-height: 1.1; font-weight: 400; margin-top: 23px; max-width: 850px; }
.page-intro p { font-size: 13px; line-height: 1.9; max-width: 570px; color: var(--on-dark-muted); margin-top: 23px; }
.section { padding-block: 88px; }
.legal-layout { max-width: 850px; }
.legal-section { padding-block: 27px; border-bottom: 1px solid var(--border); }
.legal-section h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.15; font-weight: 400; margin: 0 0 15px; }
.legal-section p { font-size: 13px; line-height: 1.9; color: var(--muted-foreground); white-space: pre-line; }
.notice { border-left: 2px solid var(--accent); padding: 16px 22px; background: var(--secondary); font-size: 12px; line-height: 1.9; margin-bottom: 25px; }

/* Contact dialog (native <dialog>: focus is trapped and Escape closes it) */
.contact-dialog { width: min(92vw, 480px); padding: 32px; border: 1px solid var(--border); border-radius: 2px; background: var(--background); color: var(--foreground); box-shadow: 0 24px 60px oklch(0.16 0.03 253 / 30%); }
.contact-dialog::backdrop { background: oklch(0.14 0.03 253 / 70%); }
.contact-dialog[open] { animation: reveal .25s ease both; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 2px; opacity: .7; transition: opacity .2s, background-color .2s; }
.dialog-close:hover { opacity: 1; background: var(--secondary); }
.dialog-close svg { width: 16px; height: 16px; }
.contact-dialog h2 { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.2; padding-right: 24px; }
.dialog-lead { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--muted-foreground); }
.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.contact-field input, .contact-field textarea { width: 100%; border: 1px solid var(--border); border-radius: 2px; background: var(--background); padding: 9px 12px; font: inherit; font-weight: 400; font-size: 14px; color: var(--foreground); outline: none; transition: border-color .2s; }
.contact-field textarea { resize: vertical; min-height: 96px; }
.contact-field input:focus, .contact-field textarea:focus { border-color: var(--primary); }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-submit { width: 100%; margin-top: 4px; }
.contact-done { margin-top: 22px; font-size: 14px; line-height: 1.7; color: var(--muted-foreground); }
.contact-error { font-size: 13px; color: var(--destructive); }

.reveal { animation: reveal .8s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) { .hero-content { padding-top: 72px; } }
@media (max-width: 1000px) { .site-width { padding-inline: 35px; } }
@media (max-width: 700px) {
  .site-width { padding-inline: 25px; }
  .site-header { height: 80px; }
  .header-inner { gap: 14px; }
  .header-actions { gap: 12px; }
  .brand-mark { width: 20px; height: 20px; }
  .btn-outline { padding-inline: 11px; font-size: 10px; gap: 6px; }
  .hero { min-height: 520px; }
  .hero::after { background: linear-gradient(180deg, oklch(0.19 0.032 253 / 94%) 0%, oklch(0.19 0.032 253 / 90%) 46%, oklch(0.2 0.03 253 / 84%) 74%, oklch(0.17 0.03 253 / 88%) 100%); }
  .hero-image { object-position: 50% 62%; }
  .hero-content { padding-top: 42px; }
  .hero h1 { font-size: 36px; margin-top: 18px; max-width: 340px; }
  .hero-description { font-size: 12px; max-width: 320px; color: oklch(0.95 0.004 240 / 96%); }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 28px; }
  .hero-role { margin-top: 24px; padding-top: 16px; font-size: 16px; max-width: 320px; }
  .cta-scene { background-attachment: scroll; }
  .cta-scene .site-width { min-height: 52vh; padding-block: 52px; }
  .cta h2 { font-size: 35px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 23px; }
  .footer-links { flex-wrap: wrap; gap: 18px; }
  .page-intro { padding-block: 52px; }
  .page-intro h1 { font-size: 47px; }
  .section { padding-block: 55px; }
  .contact-dialog { padding: 26px 22px; }
}
/* iOS ignores background-attachment: fixed and scales the whole image instead. */
@media (hover: none) { .cta-scene { background-attachment: scroll; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .contact-dialog[open] { animation: none; }
  * { scroll-behavior: auto !important; transition: none !important; }
}
