/* ==========================================================================
   MyCabin Footer Site Part — frontend.css
   Clean-room build from source-design/Footer-original.zip (styles.css).
   Every selector scoped under .pp-mycabin-footer (Page Pack Spec §5).
   Single breakpoint, min-width: 900px, matching source exactly.
   ========================================================================== */

.pp-mycabin-footer {
  --pp-ink:          #27272C;
  --pp-bone:         #FFFFFF;
  --pp-beige:        #FBF6F3;
  --pp-accent:       #917EBC;
  --pp-accent-soft:  #CDCBFF;

  --pp-surface:  var(--pp-beige);
  --pp-stone:    color-mix(in oklab, var(--pp-ink) 11%, var(--pp-bone));
  --pp-ink-line: color-mix(in oklab, var(--pp-ink) 13%, var(--pp-bone));
  --pp-ink-72:   color-mix(in oklab, var(--pp-ink) 72%, transparent);
  --pp-ink-56:   color-mix(in oklab, var(--pp-ink) 65%, transparent);

  --pp-maxw:   1280px;
  --pp-gutter: clamp(18px, 4vw, 40px);

  --pp-r-pill: 999px;
  --pp-r-lg:   10px;

  --pp-t-med:  .25s;

  font-family: "Poppins", "Helvetica Neue", Helvetica, sans-serif;
  color: var(--pp-ink);
}
.pp-mycabin-footer, .pp-mycabin-footer *, .pp-mycabin-footer ::before, .pp-mycabin-footer ::after {
  box-sizing: border-box;
}
.pp-mycabin-footer a { color: var(--pp-ink); text-decoration: none !important; }
.pp-mycabin-footer a:hover { color: var(--pp-accent); text-decoration: none !important; }
.pp-mycabin-footer button { font: inherit; color: inherit; }
.pp-mycabin-footer input { font: inherit; }
.pp-mycabin-footer :focus-visible {
  outline: 2px solid var(--pp-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.pp-mycabin-footer .pp-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.pp-mycabin-footer p { margin: 0; }

/* Real WordPress typography-cascade fix (Master Workflow §44). */
.pp-mycabin-footer .wp-block-button__link,
.pp-mycabin-footer .wp-element-button {
  font-family: inherit;
}

.pp-mycabin-footer .pp-wrap {
  max-width: var(--pp-maxw);
  margin: 0 auto;
  padding-inline: var(--pp-gutter);
}
.pp-mycabin-footer .pp-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pp-ink-56);
}


/* ==========================================================================
   WordPress Flow-margin defense
   ========================================================================== */
.pp-mycabin-footer .pp-wrap > *,
.pp-mycabin-footer .pp-footer__cols > *,
.pp-mycabin-footer .pp-footer__col-group > *,
.pp-mycabin-footer .pp-footer__col > *,
.pp-mycabin-footer .pp-newsletter > *,
.pp-mycabin-footer .pp-newsletter__text > *,
.pp-mycabin-footer .pp-legal > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.pp-mycabin-footer > * { margin-top: 0 !important; }


/* ==========================================================================
   FOOTER
   ========================================================================== */
.pp-mycabin-footer .pp-footer {
  background: var(--pp-surface);
  color: var(--pp-ink);
  padding: clamp(28px, 4vw, 56px) 0 clamp(22px, 4vw, 38px);
}

/* Two columns on a phone, paired via .pp-footer__col-group so each pair's
   total height is independent of the other (Homes+Company vs More+
   Socials — More/Socials always run longer, so a plain 4-item grid would
   size each ROW to its tallest column and leave a dead gap under Company).
   The 52%/1fr split (not an even 1fr 1fr) nudges the right pair further
   right, matching the breathing room the left pair's shorter link text
   already left on its own — exact source value, not approximated. */
.pp-mycabin-footer .pp-footer__cols {
  display: grid;
  grid-template-columns: 52% 1fr;
  gap: clamp(16px, 4vw, 44px);
}
.pp-mycabin-footer .pp-footer__col-group {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 5vw, 44px);
}
.pp-mycabin-footer .pp-footer__col { display: flex; flex-direction: column; gap: 0; }
.pp-mycabin-footer .pp-footer__col .pp-eyebrow { margin-bottom: 10px !important; }
.pp-mycabin-footer .pp-footer__col .pp-eyebrow--soft { color: var(--pp-accent); }
.pp-mycabin-footer .pp-footer__link { margin: 0 !important; }
.pp-mycabin-footer .pp-footer__link .wp-block-button__link {
  display: block;
  width: auto;
  height: auto;
  padding: 4px 0;
  background: none !important;
  border: 0;
  text-align: left;
  color: var(--pp-ink-72);
  font-size: 14.5px;
  font-weight: 300;
}
.pp-mycabin-footer .pp-footer__link .wp-block-button__link:hover { color: var(--pp-ink); }
.pp-mycabin-footer .pp-footer__link .wp-block-button__link[aria-current="page"] { color: var(--pp-accent); font-weight: 500; }
/* A little extra air before "Ready houses" — same list, but a visibly
   different kind of link than the model names above it (source's own
   .footer__col-gap utility, applied here to the wp-block-button wrapper
   since that's the element the Flow-margin defense list above already
   zeroes; !important for the same reason every other intentional margin
   in this project needs it against that defense list). */
.pp-mycabin-footer .pp-footer__link.pp-footer__col-gap { margin-top: 14px !important; }

.pp-mycabin-footer .pp-newsletter {
  margin-top: clamp(26px, 5vw, 56px) !important;
  padding: clamp(18px, 3vw, 30px);
  background: var(--pp-bone);
  border-radius: var(--pp-r-lg);
  box-shadow: 0 6px 20px color-mix(in oklab, var(--pp-ink) 7%, transparent);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: center;
}
.pp-mycabin-footer .pp-newsletter__title {
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 500;
  letter-spacing: -.018em;
  color: var(--pp-ink);
}
.pp-mycabin-footer .pp-newsletter__sub { margin-top: 6px !important; font-size: 14px; color: var(--pp-ink-56); font-weight: 300; }
/* Row geometry hardened !important. gap is 0 here, NOT the 8px visual
   gap — see the button's own margin-left below for why. Live-reproduced
   on real WordPress (this session's own Chrome, with explicit
   permission): a password-manager browser extension (confirmed: NordPass)
   dynamically inserts a REAL <nordpass-icon> element as a fourth child of
   this form when the email input gains focus, and removes it on blur —
   confirmed via document.querySelector + a live DOM children dump, not
   inferred. Because this form is display:flex, that extra element becomes
   a genuine flex item for as long as it exists. Its own inline
   `style="all: initial !important"` (also confirmed live) makes its OWN
   box unfixable by any stylesheet rule here — inline !important always
   outranks stylesheet !important regardless of selector specificity, so
   targeting the injected element itself is a dead end. The actual
   mechanism proven live: with the row's `gap` property, EVERY adjacent
   pair of flex items gets an 8px gap — adding a 4th item (even a 0-width
   one) inserts one MORE 8px gap that has to come from somewhere, and
   since input is the only flex:1/shrinkable item, it silently loses
   exactly that many pixels, dragging the arrow button left with it. */
.pp-mycabin-footer .pp-newsletter__form,
.pp-mycabin-footer .pp-newsletter__form:focus-within {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
}
/* Defensive !important on every visually- AND layout-relevant property: a
   raw <input>/<button> (this form ships as core/html, Page Pack Spec §6)
   carries no pp- root scoping of its own beyond the ancestor selector, so
   it's exposed to whatever generic input/button reset the real theme's
   global styles ship — same defensive posture as the Header's nav capsule
   (all:revert) and every other !important already in this file.

   flex/width are NOT flex:1-based any more (was: flex:1 1 auto; grows or
   shrinks to whatever space is "left over" after every OTHER flex
   sibling, real or extension-injected). Instead the input's width is
   computed directly from the row's own box — calc(100% - 43px - 8px),
   i.e. the row's total width minus the arrow's fixed diameter minus the
   fixed visual gap — so it can no longer be affected by an unexpected
   extra sibling's own width, however many pixels that happens to be, nor
   by that sibling's own share of a shared `gap`. This is the actual fix
   proven live (see note above), not a guess: an earlier attempt that
   only added an unused-child position:absolute rule did NOT stop the
   movement, because the injected element's own inline !important defeats
   any rule targeting it directly — the fix has to make THIS pack's own
   elements immune to whatever else shows up as a sibling, not try to
   neutralize the sibling itself. */
.pp-mycabin-footer .pp-newsletter__form input,
.pp-mycabin-footer .pp-newsletter__form input:focus,
.pp-mycabin-footer .pp-newsletter__form input:focus-visible,
.pp-mycabin-footer .pp-newsletter__form input:active {
  flex: 0 0 auto !important;
  width: calc(100% - 43px - 8px) !important;
  box-sizing: border-box !important;
  height: 43px !important;
  padding: 0 16px !important;
  border-radius: var(--pp-r-pill) !important;
  border: 1px solid var(--pp-stone) !important;
  background: var(--pp-surface) !important;
  color: var(--pp-ink) !important;
  font-size: 16px !important;
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}
.pp-mycabin-footer .pp-newsletter__form input::placeholder { color: var(--pp-ink-56); }
/* margin-left replaces the row's own `gap` for spacing purposes (gap is
   now 0 above) specifically so an unexpected extra flex sibling placed
   AFTER this button — exactly where the password-manager icon lands —
   never inserts an additional automatic gap that has to be paid for by
   shrinking the input. The button's own position is now derived only
   from the input's fixed width + this fixed margin, never from what
   comes after it. */
.pp-mycabin-footer .pp-newsletter__form button {
  flex: 0 0 43px !important;
  flex-shrink: 0 !important;
  margin-left: 8px !important;
  box-sizing: border-box !important;
  width: 43px !important;
  height: 43px !important;
  border-radius: var(--pp-r-pill) !important;
  border: 0 !important;
  background: var(--pp-accent-soft) !important;
  color: var(--pp-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--pp-t-med), color var(--pp-t-med);
}
.pp-mycabin-footer .pp-newsletter__form button:hover { background: var(--pp-accent) !important; color: var(--pp-bone) !important; }

.pp-mycabin-footer .pp-legal {
  margin-top: clamp(20px, 4vw, 40px) !important;
  padding-top: 16px;
  border-top: 1px solid var(--pp-ink-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
}
.pp-mycabin-footer .pp-legal__link { margin: 0 !important; }
.pp-mycabin-footer .pp-legal__link .wp-block-button__link,
.pp-mycabin-footer .pp-legal__copy {
  color: var(--pp-ink-56);
  font-size: 14px;
  font-weight: 300;
}
.pp-mycabin-footer .pp-legal__link .wp-block-button__link {
  display: block;
  height: auto;
  padding: 0;
  background: none !important;
  border: 0;
}
.pp-mycabin-footer .pp-legal__link .wp-block-button__link:hover { color: var(--pp-ink); }
/* Mobile: Privacy policy + Terms sit centred on their own row; flex-
   basis:100% forces the copyright line onto a fresh centred row below,
   inside the same wrapping flex row — no extra markup needed, matching
   source exactly. */
.pp-mycabin-footer .pp-legal__copy { flex-basis: 100%; text-align: center; margin-left: 0 !important; }


/* ==========================================================================
   DESKTOP (min-width: 900px)
   ========================================================================== */
@media (min-width: 900px) {
  .pp-mycabin-footer .pp-footer__cols { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .pp-mycabin-footer .pp-footer__col-group { display: contents; }

  .pp-mycabin-footer .pp-legal { justify-content: flex-start; }
  .pp-mycabin-footer .pp-legal__copy { flex-basis: auto; text-align: left; margin-left: auto !important; }
}
