/* ==========================================================================
   Osteo House — coming soon
   --------------------------------------------------------------------------
   EVERYTHING BRAND-RELATED LIVES IN :root BELOW.
   Change the colours + two font variables and the whole page follows.
   Current palette is a soft pastel set pulled from the treatment-room photo:
   warm cream, sage, dusty blush, muted clay.
   ========================================================================== */

:root {
  /* --- Pastels ---------------------------------------------------------- */
  --cream:        #FBF7F2;   /* page background            */
  --cream-deep:   #F4EDE4;   /* recessed panels, hairlines */
  --shell:        #FFFDFA;   /* cards                      */

  --sage:         #B9CBBB;   /* pastel sage                */
  --sage-soft:    #DDE7DC;   /* sage tint                  */
  --sage-deep:    #5E7A63;   /* primary action / accents   */

  --blush:        #F0DCD4;   /* pastel blush               */
  --clay:         #C08D77;   /* warm secondary accent      */

  --ink:          #33392F;   /* headings + body            */
  --ink-soft:     #6B7367;   /* secondary text             */
  --line:         #E6DED2;   /* borders                    */

  /* --- Type ------------------------------------------------------------- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* --- Shape ------------------------------------------------------------ */
  --radius:       18px;
  --radius-lg:    26px;
  --arch:         64px;      /* curve on the inside edge of the photo panel */
  --band:         22px;      /* sage strip under the photo on stacked layouts */

  --shadow-sm:    0 1px 2px rgba(51, 57, 47, .05);
  --shadow:       0 10px 34px -18px rgba(51, 57, 47, .34);

  --ease:         cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, .95rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, picture { display: block; max-width: 100%; }

a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--sage-deep); color: var(--cream);
  padding: .6rem 1rem; border-radius: 0 0 10px 10px;
  font-size: .9rem; text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   Layout — photo left, content right (desktop) / stacked (mobile)
   ========================================================================== */

.layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100svh;
}

/* --- Photo panel --- */

.panel {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--sage-soft);
}

/* <picture> must fill the panel, otherwise the <img> height:100% resolves
   against an auto-height parent and object-fit never kicks in. */
.panel picture {
  display: block;
  width: 100%;
  height: 100%;
}

.panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}

/* Soft cream veil so the pastel palette and the photo share an atmosphere */
.panel__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(251,247,242,.16) 0%, rgba(251,247,242,0) 34%),
    linear-gradient(0deg,   rgba(94,122,99,.20)  0%, rgba(94,122,99,0)  46%);
}

/* --- Content --- */

.content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.35rem, 6vw, 4rem);
}

.content__inner {
  width: 100%;
  max-width: 34rem;
  text-align: center;
}

/* ==========================================================================
   Logo slot — empty for now. Drop an <img class="brand__logo"> inside
   <div class="brand"> in index.html and it will centre and space itself.
   ========================================================================== */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.brand__logo {
  height: auto;
  max-width: min(260px, 70%);
  margin-inline: auto;
}

/* ==========================================================================
   Copy
   ========================================================================== */

/* Doubles as the wordmark while there is no logo. */
.eyebrow {
  margin: 0 0 .9rem;
  font-size: .84rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.eyebrow::after {
  content: "";
  display: block;
  width: 46px; height: 1px;
  margin: .9rem auto 0;
  background: var(--sage);
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.1rem, 1.3rem + 3.1vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  margin: 1.1rem auto 0;
  max-width: 26rem;
  color: var(--ink-soft);
  font-size: 1.075em;
  text-wrap: pretty;
}

/* ==========================================================================
   Actions
   ========================================================================== */

/* Two rows, deliberately unequal: booking is the primary path, contact is the
   fallback. Keep the weight difference — it's the whole point of the layout. */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-top: .7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .92rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.btn__icon { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary {
  background: var(--sage-deep);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: #526C57; transform: translateY(-2px); }

/* The booking CTA — bigger than the contact buttons on purpose. */
.btn--book {
  padding: 1.02rem 2.2rem;
  font-size: 1.06rem;
  letter-spacing: .015em;
  min-width: min(19rem, 100%);
}

/* Contact buttons sit a step quieter than the CTA above them. */
.contact .btn {
  padding: .78rem 1.35rem;
  font-size: .95rem;
}

.btn--ghost {
  background: var(--shell);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--sage); background: var(--sage-soft); transform: translateY(-2px); }

.btn:active { transform: translateY(0); }


/* ==========================================================================
   Map card
   ========================================================================== */

.mapcard {
  margin-top: clamp(2.25rem, 5vw, 3rem);
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: left;
}

.mapcard__map {
  position: relative;
  height: clamp(190px, 30vw, 260px);
  background: var(--cream-deep);
}

/* Mapbox injects its own canvas; keep its controls on-brand */
.mapcard__map .mapboxgl-ctrl-group {
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(51, 57, 47, .16);
}
.mapcard__map .mapboxgl-ctrl-logo,
.mapcard__map .mapboxgl-ctrl-attrib { opacity: .75; }

/* Brand pin (built in map.js).
   Mapbox owns `transform` on .pin itself — animate .pin__inner only, or the
   marker loses its position and jumps to the map's top-left corner. */
.pin {
  width: 30px; height: 38px;
  color: var(--clay);
  filter: drop-shadow(0 4px 6px rgba(51, 57, 47, .3));
  cursor: default;
}
.pin__inner { display: block; animation: pin-drop .5s var(--ease) both; }
.pin svg { width: 100%; height: 100%; }

@keyframes pin-drop {
  from { transform: translateY(-14px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* No-token / offline fallback */
.mapcard__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .5rem;
  padding: 1rem;
  text-align: center;
  color: var(--sage-deep);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(185,203,187,.16) 14px 15px),
    var(--cream-deep);
}
.mapcard__fallback svg { width: 30px; height: 30px; }
.mapcard__fallback p { margin: 0; font-size: .93rem; color: var(--ink-soft); line-height: 1.45; }

.mapcard__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--sage-soft);
}

.mapcard__bar address {
  font-style: normal;
  font-size: .93rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.mapcard__bar strong {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: .01em;
}

.mapcard__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .92rem;
  color: var(--sage-deep);
  text-decoration: none;
  white-space: nowrap;
}
.mapcard__link svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.mapcard__link:hover svg { transform: translateX(3px); }

.footnote {
  margin: 2rem 0 0;
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--ink-soft);
  opacity: .8;
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* Stacked layouts: the photo is a banner sitting on a sage strip, which
   hands the eye off to the cream content below instead of butting the two
   against each other. box-sizing is border-box, so the padding is carved out
   of the panel height rather than added to it. */
@media (max-width: 1023.98px) {
  .panel {
    padding-bottom: var(--band);
    background: var(--sage-soft);
  }
  .panel__wash { bottom: var(--band); }
}

/* Tablet */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .panel { height: min(46svh, 380px); }
  .panel img { object-position: 50% 30%; }
}

/* Phone */
@media (max-width: 599.98px) {
  .panel { height: min(40svh, 320px); }
  .panel img { object-position: 50% 28%; }
  .actions, .contact { flex-direction: column; }
  .btn { width: 100%; }
  .mapcard__bar { justify-content: flex-start; }
}

/* Desktop: true split screen, photo pinned full height */
@media (min-width: 1024px) {
  .layout { grid-template-columns: 46fr 54fr; }

  .panel {
    position: sticky;
    top: 0;
    height: 100svh;
    border-radius: 0 var(--arch) var(--arch) 0;
  }

  /* Desktop art direction: keep Amanda centred and her face in the upper
     third whichever way the panel aspect falls. */
  .panel img { object-position: 50% 35%; }

  .content { min-height: 100svh; }
  .content__inner { max-width: 32rem; }

  /* Vertical rhythm keys off viewport HEIGHT here, so the whole card —
     logo through map — lands on one screen on a standard laptop without
     cramping tall monitors. */
  .content        { padding-block: clamp(1.5rem, 5svh, 4.5rem); }
  .brand          { margin-bottom: clamp(1rem, 3svh, 2.5rem); }
  .eyebrow        { margin-bottom: clamp(.45rem, 1.5svh, .9rem); }
  .eyebrow::after { margin-top: clamp(.5rem, 1.5svh, .9rem); }
  .lede           { margin-top: clamp(.7rem, 2svh, 1.2rem); }
  .actions        { margin-top: clamp(1rem, 3svh, 2.25rem); }
  .contact        { margin-top: clamp(.5rem, 1.4svh, .8rem); }
  .mapcard        { margin-top: clamp(1.25rem, 3.6svh, 3rem); }
  .mapcard__map   { height: clamp(160px, 23svh, 260px); }
  .footnote       { margin-top: clamp(.9rem, 2.8svh, 2rem); }
}

/* Laptop-height screens: ease the display type down a step so the map and
   address still clear the fold. */
@media (min-width: 1024px) and (max-height: 860px) {
  .headline { font-size: clamp(1.9rem, 5.2svh, 3.1rem); }
  .btn { padding-block: .8rem; }
}

@media (min-width: 1440px) {
  .layout { grid-template-columns: 44fr 56fr; }
  .content__inner { max-width: 35rem; }
}

/* ==========================================================================
   Preferences
   ========================================================================== */

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

@media print {
  .panel, .skip-link { display: none; }
  .mapcard { box-shadow: none; }
  body { background: #fff; }
}
