/* ==========================================================================
   GIRAFFE 1on1 SA - this site's own pieces
   css/giraffehouse.css is the main Giraffe House stylesheet, copied unchanged,
   so the nav, buttons, section headings, cards, banner, contact layout, map and
   footer all match the main site. Keep that file in step with the main site;
   only the pieces the main site does not have live here.
   ========================================================================== */

:root {
  --gutter: clamp(20px, 5vw, 56px);
  /* The height of the giraffe box, measured from the photo. The rail, tongue and title all
     hang off this, so changing it keeps them lined up. */
  --g: min(70svh, 50vw);
  --rail-h: calc(var(--g) * .06545);
}

/* --------------------------------------------------------------------------
   Nav and footer: the logo is a detailed mark on white, so it sits on a badge.
   Large and hanging at the top of the desktop page, inside the bar once it is solid.
   -------------------------------------------------------------------------- */
.nav__logo {
  align-self: flex-start;
  display: block;
  width: 122px;
  margin-top: 10px;
  padding: 6px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px -12px rgba(28,16,8,.55);
  transition: width .35s var(--ease-out), margin-top .35s var(--ease-out), padding .35s;
}
.nav__logo img { width: 100%; height: auto; filter: none; }
.nav.is-scrolled .nav__logo { width: 66px; margin-top: 6px; padding: 3px; box-shadow: none; }
@media (max-width: 899px) {
  .nav__logo { width: 66px; margin-top: 6px; padding: 3px; }
}
.footer__logo--badge { display: inline-block; width: 110px; padding: 6px; background: var(--white); border-radius: var(--radius); }
.footer__logo--badge img { width: 100%; height: auto; }


/* --------------------------------------------------------------------------
   Hero: sky, fence rail and ground, with the giraffe leaning over the rail
   -------------------------------------------------------------------------- */
.ghero {
  position: relative;
  z-index: 2;   /* the tongue hangs over the next section */
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 0 auto auto;
  color: var(--bark);
  background: var(--cream-2);
  isolation: isolate;
}
.ghero__words {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-top: 152px;   /* clears the hanging logo badge, which ends at 144px */
  padding-bottom: clamp(18px, 3.4svh, 40px);
}
/* Typed in capitals, not transformed, so "1on1" keeps its lower case */
.ghero__kicker {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--bark);
  font-weight: 800; font-size: .8rem; letter-spacing: .2em;
}
/* Sized to the room beside the giraffe: the sticker line is about 8.3em wide */
.ghero__title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .94;
  letter-spacing: .01em;
  font-size: min(12.6svh, (100vw - var(--g) * .759 - 120px) / 8.3);
}
.ghero__line { display: block; overflow: hidden; padding-top: .03em; }
.ghero__line-in { display: block; }
/* The last line is a sticker. Its line is padded so the tilt is not clipped. */
.ghero__line:last-child { padding-block: .16em .18em; margin-block: -.06em -.18em; }
.ghero__title em {
  display: inline-block;
  padding: .05em .2em .02em;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bark);
  font-style: normal;
  rotate: -1.6deg;
}

/* The giraffe is layered so it really leans over the fence: head and chest behind the
   rail, muzzle and tongue in front. Both .giraffe boxes sit in the same place. */
.ghero__stage { display: none; }
.ghero__fence { position: relative; grid-row: 3; height: var(--rail-h); }
.ghero__rail {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: url("../assets/img/rail.jpg") left center / auto 100% repeat-x;
  box-shadow: 0 7px 0 -1px rgba(46,28,16,.2);
}
.giraffe {
  position: absolute;
  right: max(var(--gutter), 3.4vw);
  bottom: calc(var(--g) * -.05236);
  height: var(--g);
  aspect-ratio: 1450 / 1910;
  pointer-events: none;
  will-change: transform;
}
.giraffe--back { z-index: 2; }
.giraffe--front { z-index: 4; }
.giraffe__in { position: relative; width: 100%; height: 100%; }
.giraffe__in img:not(.giraffe__tongue) { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The big layer is a JPEG cut out by a mask, about a fifth of the size of a PNG */
.giraffe--back img {
  -webkit-mask: url("../assets/img/giraffe-back-mask.png") center / 100% 100% no-repeat;
  mask: url("../assets/img/giraffe-back-mask.png") center / 100% 100% no-repeat;
}
.giraffe__tongue {
  position: absolute;
  left: 7.586%;
  top: 91.1%;
  width: 22.76%;
  max-width: none;
  height: auto;
  transform-origin: 50% 5%;
}

.ghero__ground {
  grid-row: 4;
  display: flex;
  align-items: center;
  min-height: calc(var(--g) * .37);
  background: var(--green-soft);
}
.ghero__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px clamp(24px, 3vw, 48px);
  width: calc(100% - var(--g) * .139 - 2 * var(--gutter));
  max-width: 58vw;
  margin-left: max(var(--gutter), (100% - var(--container)) / 2);
  padding-block: 22px;
}
.ghero__sub {
  flex: 1 1 340px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  font-weight: 700;
  line-height: 1.6;
}

/* Tablets, phones and tall windows: the words, then the giraffe, then the ground. The
   giraffe is mirrored so the tongue hangs at the right, clear of the words. */
@media (max-width: 899px), (max-aspect-ratio: 5/4) {
  :root { --g: min(42svh, 84vw); }
  .ghero { grid-template-rows: auto minmax(calc(var(--g) * .9), 1fr) auto auto; }
  .ghero__words { align-self: start; padding-top: 94px; padding-bottom: 0; }
  .ghero__title { font-size: clamp(2.3rem, 12.4vw, 5.6rem); }
  .ghero__title em { font-size: .82em; white-space: nowrap; }
  .ghero__stage { display: block; grid-row: 2; }
  .giraffe { right: 0; }
  .giraffe__in { transform: scaleX(-1); }
  .ghero__ground { align-items: flex-start; min-height: calc(var(--g) * .44); }
  .ghero__action {
    display: block;
    width: auto;
    max-width: none;
    margin-inline: var(--gutter);
    padding-block: 20px 26px;
  }
  /* Keeps the words clear of the tongue */
  .ghero__sub { width: calc(100% - var(--g) * .23); margin-bottom: 18px; }
}
@media (min-width: 900px) and (max-aspect-ratio: 5/4) {
  :root { --g: min(50svh, 70vw); }
  .giraffe { right: var(--gutter); }
}


/* --------------------------------------------------------------------------
   Packages: the durations list is the main site's contact card list, in two
   columns on wide screens
   -------------------------------------------------------------------------- */
.durations dl { columns: 2 340px; column-gap: clamp(28px, 4vw, 64px); }
.durations dl > div { break-inside: avoid; }
.durations dl > div:last-child { border-bottom: 1px solid rgba(46,28,16,.09); }
.durations dd { color: var(--olive); }

/* --------------------------------------------------------------------------
   Enquiry form: package picker and two small number fields side by side
   -------------------------------------------------------------------------- */
.field--group { border: 0; padding: 0; margin: 0; min-width: 0; }
.field--group > legend { margin-bottom: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); }
/* Package picker: one tap target per package */
.pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pkg { position: relative; display: block; cursor: pointer; }
.pkg:last-child { grid-column: 1 / -1; }
.pkg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pkg > span {
  display: flex; flex-direction: column; justify-content: center;
  height: 100%; min-height: 60px;
  padding: 10px 14px;
  border: 2px solid rgba(46,28,16,.16);
  border-radius: var(--radius);
  font-weight: 800; font-size: .98rem; line-height: 1.25;
  color: var(--bark);
  transition: border-color .2s, background-color .2s;
}
.pkg small { margin-top: 2px; font-size: .84rem; font-weight: 700; color: var(--olive); }
.pkg:hover > span { border-color: var(--olive); }
.pkg input:checked + span { border-color: var(--olive); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--olive); }
.pkg input:focus-visible + span { outline: 3px solid var(--olive); outline-offset: 2px; }


/* --------------------------------------------------------------------------
   Experiences: expanding photo panels
   -------------------------------------------------------------------------- */

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--olive-deep);
  color: #fff;
}
.panel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(20,24,10,.92) 0, rgba(20,24,10,.72) 32%, rgba(20,24,10,0) 62%);
  pointer-events: none;
}
.panel--empty {
  background: repeating-linear-gradient(135deg, var(--olive-deep) 0 26px, #38511B 26px 52px);
}
.panel__slot {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .3s;
}
.panel__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 24px 22px; }
.panel__body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}
.panel__body p { margin-block: 12px 20px; color: rgba(255,255,255,.92); }

/* Phones and small tablets: a carousel. Swipe or use the arrow buttons. */
@media (max-width: 899px) {
  .trail__panels {
    display: flex;
    gap: 12px;
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .trail__panels::-webkit-scrollbar { display: none; }
  /* Short enough that a card and its arrows fit on one phone screen */
  .panel { flex: 0 0 min(84vw, 420px); height: clamp(470px, 66svh, 580px); scroll-snap-align: start; }
  .panel__tab { display: none; }

  .trail__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    padding-inline: var(--gutter);
  }
  .trail__arrow {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--olive);
    color: #fff;
    cursor: pointer;
    transition: background-color .25s, opacity .25s;
  }
  .trail__arrow:hover { background: var(--olive-deep); }
  .trail__arrow:disabled { opacity: .35; cursor: default; }
  .trail__count { min-width: 64px; text-align: center; font-weight: 800; color: var(--bark); }
}

/* Desktop: one wide panel and three slim ones */
@media (min-width: 900px) {
  .trail__nav { display: none; }
  .trail__panels {
    --open-w: calc((100vw - 2 * var(--gutter)) * .52);
    display: flex;
    gap: 10px;
    height: clamp(460px, calc(100vh - 240px), 720px);
    padding-inline: var(--gutter);
  }
  .panel { flex: 1 1 0; min-width: 0; transition: flex-grow .7s var(--ease-out); }
  .panel.is-open { flex-grow: 3.6; }

  /* The photo keeps its open size and the panel reveals more of it, so nothing
     rescales while the panel moves. */
  .panel__img {
    left: 50%;
    width: max(100%, var(--open-w));
    translate: -50% 0;
    scale: 1.08;
    transition: scale 1.1s var(--ease-out);
  }
  .panel.is-open .panel__img { scale: 1; }

  /* Closed panels are tinted, and clear a little on hover */
  .panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(20,24,10,.5);
    pointer-events: none;
    transition: opacity .45s;
  }
  .panel:hover::after { opacity: .6; }
  .panel.is-open::after { opacity: 0; }
  .panel--empty::after { background: rgba(20,24,10,.2); }

  .panel__tab {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    cursor: pointer;
    transition: opacity .3s;
  }
  .panel__tab:focus-visible { outline: 3px solid #fff; outline-offset: -7px; }
  .panel.is-open .panel__tab { opacity: 0; pointer-events: none; }
  .panel__label {
    position: absolute;
    left: 50%;
    bottom: 26px;
    translate: -50% 0;
    rotate: 180deg;
    writing-mode: vertical-rl;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.3vw, 2.3rem);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .panel__plus {
    position: absolute;
    top: 22px;
    left: 50%;
    width: 42px;
    height: 42px;
    translate: -50% 0;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    transition: background-color .25s;
  }
  .panel__plus::before, .panel__plus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: var(--accent);
    translate: -50% -50%;
  }
  .panel__plus::after { rotate: 90deg; }
  .panel:hover .panel__plus { background: rgba(0,0,0,.35); }

  /* A fixed text width stops the copy rewrapping as the panel grows. Hidden
     text is also skipped by the keyboard. */
  .panel__body {
    right: auto;
    width: min(540px, var(--open-w));
    padding: clamp(24px, 2.6vw, 38px);
    opacity: 0;
    translate: 0 16px;
    visibility: hidden;
    transition: opacity .2s, translate .2s, visibility 0s .2s;
  }
  .panel.is-open .panel__body {
    opacity: 1;
    translate: 0 0;
    visibility: visible;
    transition: opacity .5s .25s, translate .6s .25s var(--ease-out), visibility 0s;
  }
  .panel__slot { opacity: 0; }
  .panel.is-open .panel__slot { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .panel__img, .panel__body, .panel.is-open .panel__body, .panel::after, .panel__tab { transition: none; }
}


@media (max-width: 600px) {
  .pkgs { grid-template-columns: 1fr; }
  .pkg span { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; }
  .pkg small { margin-top: 0; flex: none; }
  .form__row--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .panel__img, .panel__body, .panel.is-open .panel__body, .panel::after, .panel__tab { transition: none; }
}

/* The alert note is dark green, so its bold lead-ins go white */
.note--alert b { color: #fff; }
/* "1on1" keeps its lower case, so the footer wordmark is not transformed */
.footer__big span { text-transform: none; }

/* Phones: the hero label stays on one line and the button is full width */
@media (max-width: 600px) {
  .ghero__kicker { margin-bottom: 12px; padding: 7px 12px; font-size: min(.75rem, 3.1vw); letter-spacing: .06em; white-space: nowrap; }
  .ghero__sub { font-size: 1rem; }
  .ghero .btn { width: 100%; }
}

/* Enquiry rail: an experience photo above the contact card */
.rail__photo { border-radius: var(--radius); overflow: hidden; }
.rail__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; }
@media (max-width: 899px) { .rail__photo img { aspect-ratio: 4 / 3; } }

/* Several packages can be picked, so a ticked one shows a check mark */
.pkg span { position: relative; padding-right: 40px; }
.pkg input:checked + span::after {
  content: '';
  position: absolute; top: 50%; right: 12px;
  width: 20px; height: 20px;
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--olive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Feeding strip: four portrait photos in a row under the experiences, two by two on phones */
.feedstrip { padding-bottom: clamp(64px, 8vw, 110px); }
.feedstrip__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.feedstrip__item { margin: 0; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.feedstrip__item img { width: 100%; height: 100%; object-fit: cover; }
.feedstrip__item .slot { height: 100%; aspect-ratio: auto; }
@media (max-width: 899px) {
  .feedstrip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
