/* ==========================================================================
   Hotel Poseidon – Ludwigsburg
   Design tokens on :root. Fonts are self-hosted (GDPR).
   ========================================================================== */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --navy:      #0E1A2B;
  --navy-2:    #14243A;
  --navy-3:    #1D3250;
  --paper:     #F6F0E4;
  --paper-2:   #EDE3CF;
  --white:     #FFFFFF;
  --ink:       #1A2230;
  --ink-soft:  rgba(26, 34, 48, .72);
  --cream:     #F6F0E4;
  --cream-dim: rgba(246, 240, 228, .74);
  --line:      rgba(246, 240, 228, .16);
  --line-ink:  rgba(14, 26, 43, .16);
  --gold:      #C9A24B;
  --gold-hi:   #E0BC6A;
  --gold-deep: #8A6A22;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.8rem, 6.4vw, 6rem);
  --fs-h2:   clamp(2.2rem, 4.8vw, 4.4rem);
  --fs-h3:   clamp(1.6rem, 2.4vw, 2.2rem);
  --fs-lead: clamp(1.05rem, 1.3vw, 1.25rem);

  --gutter:   clamp(18px, 4vw, 56px);
  --maxw:     1280px;
  --header-h: 76px;
  --radius:   3px;
  --ease:     cubic-bezier(.2, .7, .1, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.08; }
p { margin: 0 0 1em; }
em { font-style: italic; }
::selection { background: var(--gold); color: var(--navy); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link.screen-reader-text:focus { clip: auto; width: auto; height: auto; margin: 0; overflow: visible; white-space: normal; top: 8px; left: 8px; z-index: 1000; background: var(--gold); color: var(--navy); padding: 10px 16px; }
.ps-container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.hp { position: absolute; left: -9999px; }

/* ---------- Type & buttons ---------- */
.eyebrow, .section-label { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); margin: 0 0 1.1rem; }
.section--dark .section-label, .section--navy .section-label, .hero .eyebrow { color: var(--gold-hi); }
.section-title { font-family: var(--f-display); font-size: var(--fs-h2); letter-spacing: -.01em; margin-bottom: 1.4rem; }
.section-title em { color: var(--gold-deep); }
.section--dark .section-title em, .section--navy .section-title em { color: var(--gold-hi); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft); max-width: 40em; }
.section--dark .lead, .section--navy .lead { color: var(--cream-dim); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .95em 1.7em; border: 1px solid transparent; border-radius: var(--radius); font-weight: 600; font-size: .92rem; letter-spacing: .04em; text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: .62em 1.2em; font-size: .84rem; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-hi); }
.btn--dark { background: var(--navy); color: var(--cream); }
.btn--dark:hover { background: var(--navy-3); }
.btn--ghost { border-color: rgba(246, 240, 228, .55); color: var(--cream); background: transparent; }
.btn--ghost:hover { background: rgba(246, 240, 228, .12); }
.link-arrow { text-decoration: none; font-size: .88rem; opacity: .8; }
.link-arrow:hover { opacity: 1; }

/* ---------- Header ---------- */
.ps-header { position: fixed; inset: 0 0 auto 0; z-index: 100; color: var(--cream); transition: background .35s, transform .35s var(--ease), box-shadow .35s; }
.ps-header.is-scrolled, .ps-header--solid { background: rgba(14, 26, 43, .94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.ps-header.is-hidden { transform: translateY(-100%); }
.ps-header__inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }
.ps-logo { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--gold-hi); }
.ps-logo__crown { width: 34px; height: 26px; flex: none; }
.ps-logo__text { display: flex; flex-direction: column; line-height: 1; color: var(--cream); }
.ps-logo__small { font-size: .56rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: .3rem; }
.ps-logo__name { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: .2em; text-transform: uppercase; }
.ps-nav { margin-left: auto; }
.ps-nav__list, .ps-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; }
.ps-nav a { text-decoration: none; font-size: .88rem; letter-spacing: .06em; opacity: .85; padding: .4em 0; border-bottom: 1px solid transparent; transition: opacity .2s, border-color .2s; }
.ps-nav a:hover, .ps-nav a.is-current { opacity: 1; border-color: var(--gold); }
.ps-nav__mobile-meta { display: none; }
.ps-header__actions { display: flex; align-items: center; gap: 1rem; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--cream); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--cream); background: var(--navy); isolation: isolate; }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 26, 43, .6) 0%, rgba(14, 26, 43, .1) 30%, rgba(14, 26, 43, .55) 58%, rgba(14, 26, 43, .92) 100%); }
.hero__inner { padding-block: calc(var(--header-h) + 3rem) clamp(7rem, 12vw, 9rem); }
.hero__title { font-family: var(--f-display); font-size: var(--fs-hero); letter-spacing: .04em; text-transform: uppercase; line-height: .95; margin-bottom: 1.4rem; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero__lead { font-size: var(--fs-lead); max-width: 34em; color: rgba(246, 240, 228, .9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* quick request bar */
.quick { position: relative; z-index: 5; margin-top: -3.2rem; }
.quick__inner { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 1px; align-items: stretch; background: var(--white); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(14, 26, 43, .25); padding: 0; overflow: hidden; max-width: calc(var(--maxw) - 2 * var(--gutter)); }
.quick__field { display: flex; flex-direction: column; padding: .9rem 1.3rem; gap: .15rem; border-right: 1px solid var(--line-ink); }
.quick__field span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); }
.quick__field input, .quick__field select { border: 0; background: none; padding: .2rem 0; font-size: 1rem; width: 100%; }
.quick .btn { border-radius: 0; padding-inline: 2rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.section--paper { background: var(--paper-2); }
.section--dark { background: var(--navy); color: var(--cream); }
.section--navy { background: var(--navy-2); color: var(--cream); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head--center { text-align: center; }
.section-head--center .lead { margin-inline: auto; }
.frame { margin: 0; position: relative; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

.welcome__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-top: 2rem; }
.welcome__figure img { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; border-top: 1px solid var(--line-ink); padding-top: 1.6rem; }
.facts strong { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.facts span { font-family: var(--f-display); font-size: 1.15rem; }

/* ---------- Rooms ---------- */
.room-list { display: grid; gap: clamp(3rem, 6vw, 5.5rem); }
.room { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.6rem, 4vw, 4.5rem); align-items: center; }
.room--flip .room__media { order: 2; }
.room__media { display: grid; gap: 8px; }
.room__open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--navy); cursor: zoom-in; overflow: hidden; border-radius: var(--radius); }
.room__open img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s var(--ease); }
.room__open:hover img { transform: scale(1.04); }
.room__count { position: absolute; right: 12px; bottom: 12px; background: rgba(14, 26, 43, .85); color: var(--cream); font-size: .76rem; letter-spacing: .08em; padding: .35em .8em; border-radius: 99px; }
.room__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.room__thumbs img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: var(--radius); }
.room__number { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); margin-bottom: .6rem; }
.room__title { font-family: var(--f-display); font-size: var(--fs-h3); margin-bottom: .5rem; }
.room__subtitle { font-style: italic; font-family: var(--f-display); color: var(--ink-soft); margin-bottom: 1.2rem; }
.room__text { color: var(--ink-soft); }
.room__features { list-style: none; margin: 1.2rem 0 1.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.room__features li { font-size: .82rem; padding: .3em .85em; border: 1px solid var(--line-ink); border-radius: 99px; background: rgba(255, 255, 255, .45); }
.room__foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.room__guests { font-size: .88rem; color: var(--ink-soft); }
.empty { padding: 2rem; border: 1px dashed var(--line-ink); text-align: center; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; color: var(--cream); }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: rgba(8, 14, 24, .94); }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: .8rem; min-width: 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: .85rem; letter-spacing: .06em; opacity: .75; }
.lightbox button { background: none; border: 0; color: var(--cream); cursor: pointer; font-size: 2.6rem; line-height: 1; padding: 1rem; }
.lightbox__close { position: absolute; top: 8px; right: 12px; font-size: 2.2rem !important; z-index: 2; }
.lightbox button:hover { color: var(--gold-hi); }

/* ---------- House mosaic ---------- */
.mosaic { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: clamp(10px, 1.6vw, 22px); align-items: stretch; }
.mosaic figure img { height: 100%; min-height: 320px; border-radius: var(--radius); }
.mosaic__a, .mosaic__c { margin-top: clamp(0px, 4vw, 3.5rem) !important; }
.mosaic__c { margin-top: 0 !important; margin-bottom: clamp(0px, 4vw, 3.5rem) !important; }

/* ---------- il Castello ---------- */
.castello__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.castello__figure img { aspect-ratio: 3 / 2; border-radius: var(--radius); }

/* ---------- Form ---------- */
.form-section__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: .8rem; }
.contact-list li { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.contact-list span { min-width: 6rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-hi); padding-top: .35em; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold-hi); }
.contact-list--ink li { border-color: var(--line-ink); }
.contact-list--ink span { color: var(--gold-deep); }
.contact-list--ink a:hover { color: var(--gold-deep); }

.form-card { background: var(--paper); color: var(--ink); padding: clamp(1.4rem, 3.5vw, 3rem); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.ps-form { display: grid; gap: 1.1rem; }
.ps-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: .4rem; color: var(--gold-deep); }
.field input, .field select, .field textarea { width: 100%; padding: .8em .9em; background: var(--white); border: 1px solid var(--line-ink); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(201, 162, 75, .3); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #B3261E; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--ink-soft); }
.check input { margin-top: .3em; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.check.is-invalid label { color: #B3261E; }
.ps-form__msg { color: #B3261E; font-size: .88rem; min-height: 1.2em; margin: 0; }
.ps-form__hint { font-size: .8rem; color: var(--ink-soft); margin: 0; }
.ps-form .btn { justify-self: start; }
.notice { padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-size: .95rem; }
.notice--success { background: #E6F0E3; border-left: 4px solid #3F7A33; }
.notice--error { background: #F8E3E1; border-left: 4px solid #B3261E; }

/* ---------- Location ---------- */
.location__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: stretch; }
.address { font-style: normal; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.5; margin: 1.5rem 0; }
.map { position: relative; min-height: 440px; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.map iframe, .map__poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.map__poster { opacity: .3; }
.map__consent { position: relative; z-index: 1; height: 100%; min-height: 440px; display: grid; place-content: center; justify-items: center; gap: .6rem; text-align: center; padding: 2rem; color: var(--cream); }
.map__consent p { max-width: 28em; font-size: .88rem; color: var(--cream-dim); margin: 0; }
.map__consent .map__address { font-family: var(--f-display); font-size: 1.4rem; color: var(--cream); }
.map__consent .btn { margin-top: .8rem; }

/* ---------- Footer ---------- */
.ps-footer { background: var(--navy); color: var(--cream); padding-block: 4rem 2rem; }
.ps-footer a { text-decoration: none; }
.ps-footer a:hover { color: var(--gold-hi); }
.ps-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.ps-footer__brand { color: var(--gold-hi); }
.ps-footer__crown { width: 48px; height: 36px; }
.ps-footer__name { font-family: var(--f-display); font-size: 2.2rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cream); margin: .6rem 0 .2rem; }
.ps-footer__claim { color: var(--cream-dim); margin: 0; }
.ps-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-block: 2.5rem; }
.ps-footer h4 { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: .8rem; font-family: var(--f-body); font-weight: 600; }
.ps-footer p { color: var(--cream-dim); }
.ps-footer__legal { flex-direction: column; gap: .3rem; color: var(--cream-dim); }
.ps-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--cream-dim); }
.ps-footer__bottom p { margin: 0; }

/* ---------- Reveal ---------- */
html:not(.no-js) .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html:not(.no-js) .reveal.is-in { opacity: 1; transform: none; }
.ps-extra { padding-block: 3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .ps-nav { position: fixed; inset: 0; background: var(--navy); display: flex; flex-direction: column; justify-content: center; padding: 6rem var(--gutter) 3rem; transform: translateX(100%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; margin: 0; }
  .nav-open .ps-nav { transform: none; visibility: visible; transition: transform .45s var(--ease); }
  .ps-nav__list { flex-direction: column; gap: 1.4rem; }
  .ps-nav a { font-family: var(--f-display); font-size: 2rem; opacity: 1; }
  .ps-nav__mobile-meta { display: block; margin-top: 3rem; color: var(--cream-dim); }
  .ps-header__actions { margin-left: auto; position: relative; z-index: 2; }
  .ps-logo { position: relative; z-index: 2; }
  .welcome__grid, .room, .castello__grid, .form-section__grid, .location__grid { grid-template-columns: 1fr; }
  .room--flip .room__media { order: 0; }
  .welcome__figure img { aspect-ratio: 3 / 2; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic__b { grid-column: 1 / -1; order: -1; }
  .mosaic__a, .mosaic__c { margin: 0 !important; }
  .quick__inner { grid-template-columns: 1fr 1fr; }
  .quick__field { border-bottom: 1px solid var(--line-ink); }
  .quick .btn { grid-column: 1 / -1; padding-block: 1em; }
}
@media (max-width: 560px) {
  .ps-header__actions .btn { display: none; }
  .ps-form__row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; top: 50%; z-index: 2; background: rgba(14, 26, 43, .6) !important; }
  .lightbox__nav--prev { left: 0; }
  .lightbox__nav--next { right: 0; }
  .ps-logo__name { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html:not(.no-js) .reveal { opacity: 1; transform: none; }
}
