/* Mission Care: shared styles (tokens, type, header, footer, buttons, motion states). Plan: _work/design-plan.md */

@font-face { font-family: "Castoro"; src: url("../fonts/castoro.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Castoro"; src: url("../fonts/castoro-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-italic-var.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
/* Metric-matched fallbacks so text does not jump when the web fonts arrive */
@font-face { font-family: "Castoro Fallback"; src: local("Georgia"); size-adjust: 97%; ascent-override: 93%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "Castoro Fallback"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 95%; ascent-override: 94%; descent-override: 28%; line-gap-override: 0%; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial"); size-adjust: 100%; ascent-override: 95%; descent-override: 25%; line-gap-override: 0%; }

:root {
  --navy: #14244A;
  --navy-deep: #0C1833;
  --navy-soft: #24375F;
  --pink: #ED0E86;
  --pink-ink: #C2096D;
  --leaf: #61C331;
  --leaf-ink: #2E7714;
  --gold: #C9A24F;
  --paper: #FFFFFF;
  --mist: #F0F5EC;
  --mist-2: #E4EDE0;
  --text: #1E2435;
  --muted: #4E586C;
  --line: #D9E2D5;

  --serif: "Castoro", "Castoro Fallback", Georgia, serif;
  --sans: "Figtree", "Figtree Fallback", Arial, sans-serif;

  --btn-r: 3px;
  --gable: polygon(0 16%, 50% 0, 100% 16%, 100% 100%, 0 100%);
  --gable-flat: polygon(0 0, 50% 0, 100% 0, 100% 100%, 0 100%);
  --gable-shut: polygon(48% 100%, 50% 98%, 52% 100%, 52% 100%, 48% 100%);

  --wrap: 1400px;
  --gut: clamp(20px, 4.2vw, 64px);
  --sec: clamp(80px, 10vw, 150px);
  --head-h: 104px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --media-cap: min(76vh, 760px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 1.125rem; line-height: 1.6; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--navy); line-height: 1.08; letter-spacing: -.01em; }
h1 em, h2 em, h3 em, .foot-cta__big em { font-style: italic; color: var(--pink-ink); }
h2 { font-size: clamp(2rem, 3.5vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 1.8vw, 1.9rem); line-height: 1.15; }
.lede { font-size: clamp(1.125rem, 1.3vw, 1.24rem); line-height: 1.6; color: var(--muted); }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding: var(--sec) 0; position: relative; }
.sec--mist { background: var(--mist); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--btn-r); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
::selection { background: var(--pink); color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 56px; padding: 0 28px; border-radius: var(--btn-r); border: 2px solid transparent; font-family: var(--sans); font-weight: 650; font-size: 1.06rem; letter-spacing: .005em; text-decoration: none; cursor: pointer; transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); position: relative; white-space: nowrap; }
.btn--sm { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.btn--pink { background: var(--pink-ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(194, 9, 109, .7); }
.btn--pink:hover { background: #A5075D; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); }
.btn--line { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--line:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--light:hover { background: #fff; color: var(--navy); }
.btn .i-phone, .btn .i-arrow { width: 20px; height: 20px; flex: none; }
.btn .i-arrow { width: 22px; height: 14px; transition: transform .35s var(--ease); }
.btn:hover .i-arrow { transform: translateX(4px); }
.btn > span { display: inline-flex; gap: .35em; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; gap: .55em; color: var(--pink-ink); font-weight: 650; text-decoration: none; border-bottom: 2px solid rgba(194, 9, 109, .25); padding-bottom: 2px; transition: border-color .3s; }
.textlink:hover { border-color: var(--pink-ink); }
.textlink .i-arrow { width: 20px; height: 12px; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; background: rgba(255, 255, 255, .96); transition: box-shadow .4s var(--ease), background-color .4s; }
.site-header.is-solid { box-shadow: 0 1px 0 var(--line), 0 12px 30px -24px rgba(20, 36, 74, .5); }
.site-header__inner { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 36px); height: var(--head-h); max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); transition: height .4s var(--ease); }
.site-header.is-solid .site-header__inner { height: 84px; }
.brand { flex: none; display: block; }
.brand img { height: 76px; width: auto; transition: height .4s var(--ease); }
.site-header.is-solid .brand img { height: 62px; }
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(4px, 1vw, 14px); list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px; background: none; border: 0; color: var(--navy); font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer; position: relative; }
.nav__link::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.nav__link:hover::after, .nav__link.is-current::after, .nav__link[aria-expanded="true"]::after { transform: scaleX(1); }
.nav__chev { width: 12px; height: 8px; transition: transform .35s var(--ease); }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.site-header__actions { display: flex; align-items: center; gap: 14px; flex: none; }
.hcall { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 700; text-decoration: none; font-size: 1.02rem; white-space: nowrap; padding: 10px 4px; }
.hcall .i-phone { width: 20px; height: 20px; color: var(--pink-ink); }
.hcall:hover { color: var(--pink-ink); }

/* Care dropdown: a panel with the care pages and a link to the care guide */
.drop { position: absolute; top: calc(100% + 14px); left: 50%; width: min(760px, 90vw); transform: translate(-42%, 10px); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s .45s; z-index: 5; }
.drop::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.drop.is-open { opacity: 1; visibility: visible; transform: translate(-42%, 0); transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s; }
.drop__inner { display: grid; grid-template-columns: 1fr 230px; gap: 18px; padding: 18px; background: #fff; box-shadow: 0 30px 60px -30px rgba(20, 36, 74, .45), 0 0 0 1px var(--line); border-top: 3px solid var(--pink); }
.drop__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.drop__link { display: block; padding: 12px 14px; text-decoration: none; transition: background-color .3s; }
.drop__link:hover, .drop__link:focus-visible { background: var(--mist); }
.drop__link strong { display: block; color: var(--navy); font-weight: 650; font-size: 1.02rem; line-height: 1.3; }
.drop__link span { display: block; color: var(--muted); font-size: .94rem; line-height: 1.4; margin-top: 2px; }
.drop__feature { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; min-height: 100%; clip-path: var(--gable); }
.drop__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.drop__feature:hover .drop__img { transform: scale(1.06); }
.drop__feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 24, 51, 0) 30%, rgba(12, 24, 51, .88)); }
.drop__feature-txt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-size: .95rem; line-height: 1.4; }
.drop__feature-txt strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin-bottom: 4px; }
.drop__feature-txt .i-arrow { display: inline-block; width: 18px; height: 11px; vertical-align: middle; margin-left: 4px; }

.burger { display: none; align-items: center; gap: 10px; margin-left: auto; background: none; border: 0; padding: 10px 4px; cursor: pointer; color: var(--navy); font-weight: 650; min-height: 48px; }
.burger__lines { position: relative; width: 26px; height: 14px; }
.burger__lines span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.burger__lines span:first-child { top: 0; }
.burger__lines span:last-child { top: 12px; }
.burger[aria-expanded="true"] .burger__lines span:first-child { top: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:last-child { top: 6px; transform: rotate(-45deg); }

.mmenu { position: fixed; inset: 0; z-index: 90; background: #fff; padding: calc(var(--head-h) + 10px) var(--gut) 40px; overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .4s var(--ease), visibility 0s .4s; }
.mmenu.is-open { visibility: visible; opacity: 1; transition: opacity .4s var(--ease), visibility 0s; }
.mmenu__inner { max-width: 560px; }
.mmenu__h { margin: 10px 0 6px; color: var(--pink-ink); font-weight: 700; font-size: .95rem; }
.mmenu__list { list-style: none; margin: 0 0 18px; padding: 0; }
.mmenu__list a { display: block; padding: 10px 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.mmenu__cta { width: 100%; margin: 10px 0 18px; }
.mmenu__phone { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; font-size: 1.2rem; text-decoration: none; padding: 8px 0; }
.mmenu__phone .i-phone { width: 22px; height: 22px; color: var(--pink-ink); }
html.menu-open { overflow: hidden; }

@media (max-width: 1240px) {
  .nav, .site-header__actions .hcall { display: none; }
  .site-header__actions { margin-left: auto; }
  .burger { display: inline-flex; margin-left: 4px; }
}
@media (max-width: 380px) {
  .brand img { height: 46px !important; }
  .site-header__inner { gap: 10px; }
}
@media (max-width: 600px) {
  :root { --head-h: 84px; }
  .brand img { height: 58px; }
  .site-header.is-solid .site-header__inner { height: 72px; }
  .site-header.is-solid .brand img { height: 50px; }
  .site-header__actions .btn { display: none; }
}

/* ---------- Shared pieces ---------- */
.rule { display: block; height: 2px; background: linear-gradient(90deg, var(--pink), var(--gold) 60%, rgba(201, 162, 79, 0)); transform-origin: left; }
.house-line { width: 100%; max-width: none; height: auto; overflow: visible; color: var(--pink); }
.gable { clip-path: var(--gable); }
/* A framed photo: square, with an offset outline in leaf green drawn inside the section */
.frame { position: relative; overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--mist); color: var(--navy); font-weight: 600; font-size: .95rem; }
.chip::before { content: ""; width: 8px; height: 8px; background: var(--leaf); transform: rotate(45deg); }
.rail-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; overflow: visible; color: var(--line); }
.petal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Holding pages: a compact opener (about half a screen) with the page's own photo in a gable window */
.hold { position: relative; background: var(--mist); padding: calc(var(--head-h) + clamp(36px, 5vw, 70px)) 0 clamp(50px, 6vw, 80px); overflow: clip; }
.hold .petal-canvas { z-index: 0; }
.hold__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.hold h1 { font-size: clamp(2.6rem, 4.6vw, 4.6rem); margin-bottom: .35em; }
.hold__line { font-size: clamp(1.15rem, 1.4vw, 1.3rem); color: var(--text); max-width: none; }
.hold__soon { display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 28px; padding: 18px 20px; background: #fff; border-left: 3px solid var(--leaf); }
.hold__soon p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.hold__soon strong { color: var(--navy); }
.hold__row { display: flex; flex-wrap: wrap; gap: 14px; }
.hold__media { position: relative; height: min(52vh, 520px); }
.hold__media .house-line { position: absolute; left: -16px; top: -16px; width: calc(100% + 32px); height: calc(100% + 32px); z-index: 2; pointer-events: none; }
.hold__img { position: absolute; inset: 0; clip-path: var(--gable); overflow: hidden; }
.hold__img img { width: 100%; height: 100%; object-fit: cover; }
.hold-links { padding: clamp(60px, 7vw, 100px) 0; background: #fff; }
.hold-links h2 { margin-bottom: 30px; }
.hold-links__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.hold-card { display: block; text-decoration: none; color: var(--navy); }
.hold-card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; clip-path: var(--gable); margin-bottom: 14px; }
.hold-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.hold-card:hover .hold-card__img img { transform: scale(1.06); }
.hold-card strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.hold-card span { display: block; color: var(--muted); font-size: 1rem; margin-top: 4px; }
@media (max-width: 900px) {
  .hold__grid { grid-template-columns: 1fr; }
  .hold__media { height: 44vh; }
  .hold-links__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .hold-links__grid { grid-template-columns: 1fr; } }

/* Legal pages */
.legal-top { position: relative; background: var(--navy); color: #fff; padding: calc(var(--head-h) + 50px) 0 56px; overflow: clip; }
.legal-top__mark { position: absolute; right: 6%; top: 18%; width: min(22vw, 260px); opacity: .12; pointer-events: none; }
.legal-top h1 { color: #fff; font-size: clamp(2.4rem, 4vw, 3.6rem); position: relative; z-index: 1; }
.legal-top p { position: relative; z-index: 1; color: rgba(255, 255, 255, .85); margin: 12px 0 0; }
.legal { position: relative; padding: clamp(50px, 6vw, 90px) 0; overflow: clip; }
.legal__mark { position: absolute; right: -4%; top: 10%; width: min(36vw, 460px); opacity: .07; pointer-events: none; }
.legal__body { position: relative; }
.legal__body { max-width: 120ch; }
.legal__body h2 { font-size: clamp(1.6rem, 2.2vw, 2.1rem); margin: 1.4em 0 .5em; }

/* ---------- Closing call to action ---------- */
.foot-cta { background: var(--mist); padding: clamp(80px, 9vw, 130px) 0; position: relative; overflow: clip; }
.foot-cta__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.foot-cta__big { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1.1; color: var(--navy); margin: 0 0 .5em; }
.foot-cta__big em { display: inline; }
.foot-cta__line { font-size: 1.15rem; color: var(--muted); }
.foot-cta__row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.foot-cta__media { position: relative; height: min(64vh, 600px); overflow: hidden; }
.foot-cta__img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .foot-cta__inner { grid-template-columns: 1fr; }
  .foot-cta__media { height: 46vh; }
}

/* ---------- Footer ---------- */
.site-footer__main { position: relative; background: var(--navy); color: rgba(255, 255, 255, .86); padding: clamp(64px, 7vw, 100px) 0 28px; overflow: clip; }
.site-footer__petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.site-footer__inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 60px); }
.site-footer__logo img { height: 78px; width: auto; margin-bottom: 20px; }
.site-footer__brand p { font-size: 1.02rem; max-width: none; }
.site-footer__h { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--gold); margin: 6px 0 16px; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer__main a { color: #fff; text-decoration: none; transition: color .3s; }
.site-footer__main a:hover { color: #FFB3D9; }
.site-footer__phone { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 6px; }
.site-footer__addr { font-size: 1rem; margin-top: 12px; }
.site-footer__link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-weight: 650; }
.site-footer__link .i-arrow { width: 20px; height: 12px; }
.site-footer__base { position: relative; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin-top: clamp(40px, 5vw, 70px); padding-top: 22px; font-size: .95rem; color: rgba(255, 255, 255, .78); }
.site-footer__base p { margin: 0; }
.site-footer__base .rule { position: absolute; left: var(--gut); right: var(--gut); top: 0; }
.site-footer__legal { margin-left: auto !important; }
.credit a { font-weight: 700; }
@media (max-width: 1000px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__legal { margin-left: 0 !important; }
}

/* ---------- Forms (shared by the contact page and the care guide) ---------- */
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 650; color: var(--navy); font-size: 1rem; }
.field .hint { color: var(--muted); font-size: .95rem; font-weight: 400; }
.input, .select, .textarea { width: 100%; min-height: 54px; padding: 12px 16px; border: 1.5px solid #B9C5B4; border-radius: 0; background: #fff; font: inherit; font-size: 1.06rem; color: var(--text); transition: border-color .3s, box-shadow .3s; }
.textarea { min-height: 130px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 48px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314244A' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 18px center / 18px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(237, 14, 134, .25); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #B3261E; }
.err { color: #B3261E; font-size: .95rem; font-weight: 600; }

/* ---------- Motion start states (only when motion runs) ---------- */
html.js:not(.rm):not(.no-motion) [data-rise],
html.js:not(.rm):not(.no-motion) [data-rise-kids] > * { opacity: 0; transform: translateY(34px); }
html.js:not(.rm):not(.no-motion) [data-gable] { clip-path: var(--gable-shut); }
html.js:not(.rm):not(.no-motion) [data-reveal] { clip-path: inset(0 0 100% 0); }
html.js:not(.rm):not(.no-motion) [data-rule] { transform: scaleX(0); }
html.js:not(.rm):not(.no-motion) [data-split]:not(.is-split) { visibility: hidden; }

/* Split heading line masks: padded so descenders and italic tails never clip, pulled back so layout does not move. */
[data-split] { display: flow-root; }
[data-split].has-lines { display: flex; flex-direction: column; }
[data-split] .ln-mask { display: block; padding: .22em .15em .5em; margin: -.22em -.15em -.5em; overflow: clip; }
[data-split] .ln { display: block; }

/* First-screen text waits for the fonts (at most 1.5 s) */
html.wf .site-header__inner, html.wf .hero__copy, html.wf .hold__grid, html.wf .opener__copy { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
