/* ═══════════════════════════════════════════════════════════
   HotelOPEX — light variant (2a)
   Tokens lifted verbatim from the design file.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:          #F2F0EB;   /* cream — page */
  --surface:     #FBFAF7;   /* warm white — cards */
  --sunk:        #EAE6DB;   /* sunk cream */

  --ink:         #1D2535;   /* navy ink */
  --ink-2:       #2A3348;
  --muted:       #6C6A63;
  --dim:         #7A7870;
  --faint:       #9A988F;

  --line:        #E4E0D6;
  --border:      #D9D4C7;

  --accent:      #C79A3B;   /* gold — fills */
  --accent-ink:  #1B273D;   /* navy on gold */
  --accent-deep: #C79A3B;   /* the brand dot */
  --accent-text: #A97F26;   /* gold-coloured text */

  --danger:      #C64849;

  --font:        'Space Grotesk', system-ui, sans-serif;
  --mono:        'Space Mono', ui-monospace, monospace;

  --wrap:        1120px;
  --r:           14px;
  --shadow:      0 1px 2px rgba(20,24,40,.04), 0 12px 32px -18px rgba(20,24,40,.18);

  --ease:        cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 999px;
}
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ── brand ──────────────────────────────────────────────── */

.brand {
  display: inline-flex; align-items: baseline; gap: 1px;
  font-weight: 700; font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: .02em; line-height: 1;
  white-space: nowrap;
}
.brand .dot {
  width: .22em; height: .22em; border-radius: 999px;
  background: var(--accent-deep);
  margin-left: 2px;
  display: inline-block;
}
.brand-sm { font-size: 26px; }



/* legal pages: one way back, nothing more */
.legal-bar { border-bottom: 1px solid var(--line); }
.nav-back {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 10px 4px;
  transition: color .2s;
}
.nav-back:hover { color: var(--accent-text); }

/* ── language switcher ───────────────────────────────────── */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.flag {
  width: 22px; height: 15px;
  border-radius: 3px;
  flex: none;
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--ink) 12%, transparent) inset;
}

.lang { position: relative; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lang-btn:hover { border-color: var(--accent-deep); background: color-mix(in oklch, var(--accent) 12%, transparent); }

.caret {
  width: 13px; height: 13px;
  color: var(--faint);
  transition: transform .22s var(--ease);
}
.lang-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  min-width: 172px;
  list-style: none;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: drop .18s var(--ease) both;
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.lang-menu li {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s;
}
.lang-menu li:hover { background: color-mix(in oklch, var(--accent) 14%, transparent); }
.lang-menu li[aria-selected="true"] {
  background: color-mix(in oklch, var(--accent) 24%, transparent);
  font-weight: 600;
}

/* ── screen-reader utility ───────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}


/* ── hero ────────────────────────────────────────────────── */

/*  The hero fills exactly one screenful and never spills.
 *
 *  --vh   the real visible height, measured on the device by app.js.
 *         100vh is a lie on phones: it counts the strip behind the
 *         address bar, so the bottom of the hero gets cut off.
 *
 *  --fit  a scale factor (1 → 0.62) that app.js lowers until the content
 *         actually fits the height it measured. Short phone, long German
 *         headline, landscape — one mechanism handles all of it.
 */
.hero {
  height: var(--vh, 100svh);
  min-height: 460px;
  display: grid;
  grid-template-rows: auto 1fr auto;   /* bar · content · rail */
  overflow: hidden;
}

.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: clamp(22px, 3.4vh, 40px) clamp(20px, 5vw, 56px);
  padding-left:  max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 clamp(20px, 7vw, 120px);
  min-height: 0;                       /* lets this grid row shrink */
}

.eyebrow {
  font-family: var(--mono);
  font-size: calc(13px * max(var(--fit, 1), .85));
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.hero-inner .eyebrow { margin-bottom: calc(26px * var(--fit, 1)); }

h1 {
  font-size: calc(clamp(32px, 6.6vw, 76px) * var(--fit, 1));
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 15ch;
  text-wrap: balance;
}

.lede {
  margin-top: calc(26px * var(--fit, 1));
  font-size: calc(clamp(16px, 1.6vw, 20px) * max(var(--fit, 1), .88));
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
  text-wrap: pretty;
}

.cta-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  margin-top: calc(36px * var(--fit, 1));
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: calc(16px * max(var(--fit, 1), .78)) 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-2);
  background: transparent;
  font-family: inherit;
  font-weight: 500;
  font-size: calc(17px * max(var(--fit, 1), .9));
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s;
}
.btn:hover { border-color: var(--accent-deep); background: color-mix(in oklch, var(--accent) 12%, transparent); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, var(--accent-ink)); border-color: transparent; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── signature: the module rail with live status lights ──── */

.rail {
  display: flex; flex-wrap: wrap; justify-content: center;
  list-style: none;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.rail li {
  display: flex; align-items: center; gap: 10px;
  padding: 22px clamp(14px, 2vw, 26px);
  white-space: nowrap;
}
.rail li + li { border-left: 1px solid var(--line); }

.led {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent-deep);
  flex: none;
  animation: pulse 2.8s var(--ease) infinite;
}
.rail li:nth-child(2) .led { animation-delay: .35s; }
.rail li:nth-child(3) .led { animation-delay: .7s; }
.rail li:nth-child(4) .led { animation-delay: 1.05s; }
.rail li:nth-child(5) .led { animation-delay: 1.4s; }
.rail li:nth-child(6) .led { animation-delay: 1.75s; }

@keyframes pulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent-deep) 40%, transparent); }
  35%           { box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent-deep) 0%, transparent); }
}

/* ── sections ────────────────────────────────────────────── */

.section { padding: clamp(72px, 11vw, 130px) 0; }
.section-contact { background: var(--sunk); border-top: 1px solid var(--line); }

.sec-head { max-width: 62ch; margin-bottom: clamp(40px, 6vw, 64px); }
.sec-head h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sec-sub { margin-top: 16px; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }

/* ── blog ────────────────────────────────────────────────── */

.posts { border-top: 1px solid var(--line); }
.posts-loading, .posts-empty { padding: 32px 0; color: var(--faint); font-family: var(--mono); font-size: 14px; }
.posts-empty { color: var(--danger); }

.post { border-bottom: 1px solid var(--line); }

.post-head {
  width: 100%;
  display: flex; align-items: flex-start; gap: 20px;
  padding: 26px 8px 26px 0;
  background: none; border: 0;
  font-family: inherit; color: inherit;
  text-align: left; cursor: pointer;
  transition: background .2s;
}
.post-head:hover { background: color-mix(in oklch, var(--accent) 6%, transparent); }

.post-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  flex: none;
  width: 108px;
  padding-top: 5px;
}

.post-titles { flex: 1; min-width: 0; }
.post-title { font-size: clamp(19px, 2vw, 23px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

.post-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.post-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink);
  background: color-mix(in oklch, var(--accent) 42%, transparent);
  padding: 3px 9px; border-radius: 999px;
}

/* shown when a post has no translation for the current language */
.post-tag-en {
  color: var(--faint);
  background: transparent;
  border: 1px solid var(--line);
}

.chev {
  flex: none; width: 22px; height: 22px;
  margin-top: 6px;
  color: var(--faint);
  transition: transform .28s var(--ease), color .2s;
}
.post[open] .chev, .post.open .chev { transform: rotate(180deg); color: var(--accent-text); }
.post-head:hover .chev { color: var(--accent-text); }

.post-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .38s var(--ease);
}
.post.open .post-body { grid-template-rows: 1fr; }

.post-body > div { overflow: hidden; }

.post-copy {
  padding: 0 0 32px 128px;
  max-width: 72ch;
  color: var(--muted);
}
.post-copy > * + * { margin-top: 16px; }
.post-copy strong { color: var(--ink); font-weight: 600; }
.post-copy code {
  font-family: var(--mono); font-size: .88em;
  background: var(--sunk); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; color: var(--ink-2);
}
.post-copy ul { padding-left: 20px; }
.post-copy li + li { margin-top: 6px; }

/* ── contact form ────────────────────────────────────────── */

/* the pilot offer — the loudest thing on the page, and deliberately so:
   it is the only reason a stranger fills in a form for software that
   does not exist yet */
.pilot {
  max-width: 72ch;
  margin-bottom: 22px;
  padding: 24px 26px;
  background: color-mix(in oklch, var(--accent) 18%, var(--surface));
  border: 1px solid var(--accent-deep);
  border-radius: var(--r);
}

.pilot-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.pilot-body {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
}
.pilot-body strong { color: var(--ink); font-weight: 600; }

.notice {
  display: flex; align-items: flex-start; gap: 14px;
  max-width: 72ch;
  margin-bottom: 40px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-deep);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 16px;
}
.notice strong { color: var(--ink); font-weight: 600; }
.led-warn { margin-top: 8px; animation: none; }

.form {
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}

fieldset { border: 0; }
fieldset + fieldset { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }

legend {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.opt { color: var(--faint); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover { border-color: var(--dim); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 30%, transparent);
}
textarea { resize: vertical; min-height: 110px; }

.hint { font-size: 13px; color: var(--faint); font-family: var(--mono); }

.field.bad input { border-color: var(--danger); }
.field.bad .hint { color: var(--danger); }

.consent { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--muted); font-weight: 400; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent-deep); flex: none; }
.check a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 30px; }
.form-status { font-size: 15px; color: var(--muted); }
.form-status.ok { color: var(--accent-text); font-weight: 500; }
.form-status.err { color: var(--danger); }

/* ── footer ──────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); padding: 44px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--muted); }
.foot-links a:hover { color: var(--accent-text); }
.foot-note { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--faint); }

/* ── legal pages ─────────────────────────────────────────── */

.legal { padding: 70px 0 110px; max-width: 76ch; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); max-width: none; }
.legal h2 { margin-top: 44px; font-size: 22px; font-weight: 600; }
.legal p, .legal ul { margin-top: 14px; color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* Name and address are served as an image, not text — see the note in
   DEPLOY.md about the trade-off this makes. */
.legal-img {
  display: block;
  width: 180px;
  height: auto;
  margin-top: 4px;
  /* the PNG is a flat ink colour, so it can simply be inverted for a dark theme */
  image-rendering: -webkit-optimize-contrast;
}
.legal .todo {
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  border: 1px dashed var(--accent-deep);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 14px;
}

/* ── entrance motion ─────────────────────────────────────── */

.reveal { animation: up .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.rail { animation: fade 1s ease both .6s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── responsive ──────────────────────────────────────────── */

/* Tablet and below */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .post-date { width: 92px; }
}

/* ── PHONE ───────────────────────────────────────────────────
   There is no navigation to fit — the hero is the navigation. What
   matters here is that the hero fills exactly one screenful (app.js
   measures --vh and lowers --fit until it does) and that everything
   below it is comfortable under a thumb.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 780px) {

  html { scroll-padding-top: 0; }

  /* keep clear of the notch / home indicator */
  .foot { padding-bottom: max(44px, env(safe-area-inset-bottom)); }

  .brand { font-size: 24px; }

  /* ── hero ── */
  .hero-inner { padding: 24px 22px; }
  h1 { font-size: calc(clamp(28px, 8.4vw, 44px) * var(--fit, 1)); max-width: 100%; }
  .lede { font-size: calc(16px * max(var(--fit, 1), .9)); margin-top: calc(18px * var(--fit, 1)); }

  .cta-row { flex-direction: column; width: 100%; gap: 10px; margin-top: calc(28px * var(--fit, 1)); }
  .btn { width: 100%; min-height: calc(52px * max(var(--fit, 1), .82)); padding: 12px 24px; }

  /* Book a demo is the point of the page — first under the thumb */
  .cta-row .btn-primary { order: -1; }

  /* ── module rail: two readable columns, not a squashed row ── */
  .rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: .12em;
  }
  .rail li {
    padding: 16px 20px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .rail li:nth-child(odd)  { border-right: 1px solid var(--line); }
  .rail li:nth-child(5),
  .rail li:nth-child(6)    { border-bottom: 0; }

  /* ── sections ── */
  .section { padding: 64px 0; }
  .sec-head { margin-bottom: 36px; }

  /* ── blog: date above the title, full-width tap area ── */
  .post-head { flex-wrap: wrap; padding: 20px 0; min-height: 64px; }
  .post-date { width: auto; flex-basis: 100%; padding-top: 0; margin-bottom: 6px; }
  .post-titles { flex: 1; }
  .post-copy { padding-left: 0; padding-bottom: 26px; }
  .chev { margin-top: 0; align-self: center; }

  /* ── form ── */
  .form { padding: 22px 18px; border-radius: 12px; }
  fieldset + fieldset { margin-top: 26px; padding-top: 24px; }
  /* 16px is the floor — anything smaller makes iOS zoom the page on focus */
  input, textarea { font-size: 16px; }
  .check input { width: 22px; height: 22px; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .form-foot .btn { width: 100%; }
  .form-status { text-align: center; }

  .notice { padding: 16px 18px; font-size: 15px; }
  .pilot { padding: 20px 18px; margin-bottom: 16px; }
  .pilot-body { font-size: 16px; }

  /* ── language menu: never runs off the right edge ── */
  .lang-menu { right: 0; min-width: 160px; }

  /* ── footer ── */
  .foot-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot-links { gap: 6px 18px; }
  .foot-note { margin-left: 0; }

  /* ── legal pages ── */
  .legal { padding: 44px 0 72px; }
  .legal h2 { margin-top: 34px; }
}

@media (max-width: 380px) {
  .brand { font-size: 21px; }
  .lang-btn { padding: 6px 8px 6px 7px; gap: 6px; }
  .rail { grid-template-columns: 1fr; }
  .rail li { border-right: 0 !important; }
  .rail li:nth-child(5) { border-bottom: 1px solid var(--line); }
}

/* A finger is not a mouse — hover tints that stick look like bugs on touch. */
@media (hover: none) {
  .btn:hover,
  .post-head:hover,
  .lang-btn:hover { background: transparent; border-color: var(--border); }
  .btn-primary:hover { background: var(--accent); border-color: var(--accent); }
  .post-head:active { background: color-mix(in oklch, var(--accent) 10%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
