/* =========================================================
   Mira — static site
   Palette + type sampled from the reference design
   ========================================================= */

:root{
  --bg:          #FDF6F1;
  --sand:        #F8E9E3;
  --sand-deep:   #F4DED6;
  --card:        #FFFDFB;
  --ink:         #633B2C;   /* headings, primary brown */
  --ink-deep:    #3E2318;
  --accent:      #A85B66;   /* rose gold / label accent */
  --accent-deep: #8A424D;   /* hover state of accent buttons */
  --muted:       #7A685D;
  --line:        rgba(99,59,44,.14);
  --line-soft:   rgba(99,59,44,.08);

  --serif: "Hedvig Letters Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui:    "General Sans", "Inter", system-ui, sans-serif;

  --r-sm: 10px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --wrap: 1240px;
  --gut:  clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* ---------- button depth ----------
     The look is a moulded object, not a flat label with a shadow under it —
     the same read as a soft-plastic app icon. Three layers do it:

       --btn-face  the surface is domed, not flat: light pools along the top
                   edge and falls off past the midline, so the pill looks like
                   it curves away from you.
       --btn-rim   the moulded edge. A bright top line (the lit crest), a
                   hairline all the way round (the parting line of the mould),
                   and a soft inner shade rising off the bottom — that last one
                   is what sells the curve; a flat 1px dark line reads as a
                   border instead.
       --btn-lift  ambient occlusion, in three low-alpha layers: a contact
                   shadow tight to the edge, a mid one, and a wide soft one.
                   One dark shadow reads as a sticker dropped on the page;
                   stacked faint ones read as an object sitting in light.

     Everything is tinted with the ink brown, never neutral grey, so the depth
     stays inside the palette. Plain tokens are for light fills; the -d pair is
     for ink and accent fills, where white at full strength would blow out. */
  --btn-face:    linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.22) 46%, rgba(99,59,44,.05));
  --btn-face-d:  linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.05) 44%, rgba(0,0,0,.10));
  --btn-rim:     inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.5),
                 inset 0 -7px 9px -9px rgba(99,59,44,.45);
  --btn-rim-d:   inset 0 1px 0 rgba(255,255,255,.30), inset 0 0 0 1px rgba(255,255,255,.09),
                 inset 0 -9px 14px -11px rgba(0,0,0,.6);
  --btn-lift:    0 .5px 1px rgba(99,59,44,.07), 0 2px 3px -1px rgba(99,59,44,.07),
                 0 6px 12px -4px rgba(99,59,44,.09);
  --btn-lift-h:  0 1px 1.5px rgba(99,59,44,.07), 0 4px 7px -2px rgba(99,59,44,.09),
                 0 13px 22px -8px rgba(99,59,44,.15);
  --btn-press:   inset 0 2px 5px rgba(99,59,44,.17), inset 0 0 0 1px rgba(99,59,44,.05),
                 0 .5px 1px rgba(99,59,44,.09);
  --btn-press-d: inset 0 2px 6px rgba(0,0,0,.32), inset 0 0 0 1px rgba(0,0,0,.10),
                 0 .5px 1px rgba(99,59,44,.12);
}

/* ---------- reset ---------- */
*,*::before,*::after{ box-sizing:border-box }
html{
  -webkit-text-size-adjust:100%; scroll-behavior:smooth;
  /* kill horizontal panning at the viewport itself — body's clip alone
     doesn't stop iOS Safari from dragging the page sideways when a reveal
     transform pokes past the edge (clip fallback below, same as body) */
  overflow-x:hidden;
  overflow-x:clip;
}
html, body{ max-width:100% }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  /* clip, not hidden: clip can never become a scroll container, so the
     phone header's position:sticky is safe (hidden kept as the fallback) */
  overflow-x:hidden;
  overflow-x:clip;
}
img{ max-width:100%; display:block }
a{ color:inherit; text-decoration:none }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer }
h1,h2,h3,h4{ margin:0; font-family:var(--serif); font-weight:400; line-height:1.06; letter-spacing:-.015em }
p{ margin:0 }
ul{ margin:0; padding:0; list-style:none }
::selection{ background:var(--ink); color:#fff }

/* ---------- layout primitives ---------- */
.wrap{ width:min(var(--wrap), 100% - var(--gut)*2); margin-inline:auto }
.section{ padding:clamp(64px,10vw,132px) 0 }

/* Line-work for the sand surfaces: concentric hairline rings anchored to one
   corner (ripples — same family as the lotus mark). The image is a 1440 box
   with the rings centred in it; each surface shows one quarter by hanging
   half the box off two edges. Kept at natural size so the 1px stroke never
   scales soft. Ink at 7% — a whisper, not a pattern. */
:root{
  --rings:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 1440'%3E%3Cg fill='none' stroke='%23633B2C' stroke-opacity='.07'%3E%3Ccircle cx='720' cy='720' r='140'/%3E%3Ccircle cx='720' cy='720' r='280'/%3E%3Ccircle cx='720' cy='720' r='420'/%3E%3Ccircle cx='720' cy='720' r='560'/%3E%3Ccircle cx='720' cy='720' r='700'/%3E%3C/g%3E%3C/svg%3E");
}

.section--sand{
  background:var(--sand) var(--rings) no-repeat left -720px top -720px;
  background-size:1440px 1440px;
  /* hairline edges so the band meets the cream pages on a drawn line */
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}

.panel{ border-radius:var(--r-xl); padding:clamp(24px,4vw,56px) }
.panel--sand{
  background:var(--sand) var(--rings) no-repeat right -720px top -720px;
  background-size:1440px 1440px;
}

/* Glass rim — the lit hairline every frosted card shares. A flat border reads
   as an outline; real glass catches light on its top edge and lets it fall
   away, so the rim is a top-down white gradient. Drawn by an ::after ring
   masked to a 1px band: costs no layout width and paints above the cards'
   internal glow layers. Hosts are all positioned already; the relative here
   is only a fallback for future flow-positioned users. */
.glass-rim{ position:relative }
.glass-rim::after{
  content:""; position:absolute; inset:0; z-index:2;
  border-radius:inherit; padding:1px; pointer-events:none;
  background:linear-gradient(180deg,
    rgba(255,255,255,.40),
    rgba(255,255,255,.12) 42%,
    rgba(255,255,255,.05));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
          mask-composite:exclude;
}

.sec-head{ margin-bottom:clamp(32px,5vw,60px) }
.sec-head--center{ text-align:center; display:flex; flex-direction:column; align-items:center; gap:20px }

.h2{ font-size:clamp(38px,6.4vw,74px); color:var(--ink) }
.h2--sm{ font-size:clamp(32px,4.4vw,52px) }
.lead{ color:var(--muted); font-size:clamp(14.5px,1.1vw,16px); line-height:1.62; max-width:56ch }
.muted{ color:var(--muted); font-size:14px }

/* ---------- chip ---------- */
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 15px 7px 12px;
  background:var(--sand); border-radius:99px;
  font-family:var(--ui); font-size:11.5px; font-weight:500;
  letter-spacing:.09em; text-transform:uppercase; color:var(--ink);
  white-space:nowrap;
}
.chip::before{ content:""; width:5px; height:5px; border-radius:50%; background:var(--accent) }
.section--sand .chip, .panel--sand .chip{ background:rgba(255,255,255,.7) }

/* ---------- buttons ---------- */
/* The --bt-* locals are the variant hooks: a variant that fills the pill with
   ink or accent swaps in the dark face/rim/press by re-declaring them, and the
   rest/hover/press rules below keep working untouched. Variants set
   background-color (never the `background` shorthand) so the face survives. */
.btn{
  --bt-face: var(--btn-face);
  --bt-rim:  var(--btn-rim);
  --bt-lift: var(--btn-lift);
  --bt-lift-h:var(--btn-lift-h);
  --bt-press:var(--btn-press);

  display:inline-flex; align-items:center; gap:9px;
  padding:11px 20px 11px 12px; border-radius:99px;
  font-family:var(--ui); font-size:14px; font-weight:500;
  border:1px solid transparent; position:relative; overflow:hidden;
  /* the 1px transparent border is here to keep the height equal to the
     bordered variants — but the face gradient starts at the padding box by
     default, so that ring paints raw fill with none of the crest highlight on
     it, and reads as a dark line drawn above the button. Start the gradient at
     the border box and the crest lands on the actual top edge. */
  background-image:var(--bt-face); background-origin:border-box;
  box-shadow:var(--bt-rim), var(--bt-lift);
  transition:background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease),
             transform .3s var(--ease), box-shadow .3s var(--ease);
  will-change:transform;
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--bt-rim), var(--bt-lift-h) }
/* pressed: the surface drops into its own shadow, and it does so instantly —
   a press that eases in feels like lag */
.btn:active{ transform:translateY(1px); box-shadow:var(--bt-press); transition-duration:.06s }
.btn__ico{
  width:24px; height:24px; border-radius:50%;
  display:grid; place-items:center; flex:none;
  background:var(--sand); color:var(--accent);
  /* the disc is moulded out of the same material, one scale down */
  background-image:var(--btn-face);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), inset 0 -4px 5px -5px rgba(99,59,44,.5),
             0 1px 1.5px rgba(99,59,44,.13);
  transition:transform .5s var(--ease-out);
}
/* Phosphor Light draws a 12u stroke on a 256 box — below ~16px that lands
   sub-pixel and the glyph fades out. Stroking the fill outline with
   currentColor adds ~5u per side, rebuilding it near the pack's Bold. */
.btn__ico svg{
  display:block; width:14px; height:14px;
  stroke:currentColor; stroke-width:10px; stroke-linejoin:round;
}
.btn__ico--light{
  background-color:rgba(255,255,255,.22); background-image:var(--btn-face-d); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 -4px 5px -5px rgba(0,0,0,.5);
}
.btn:hover .btn__ico{ transform:rotate(180deg) }

/* the moulded rim replaces the drawn outline these variants used to lean on —
   line-soft is all that's left, just enough to hold the edge on white */
.btn--pill{ background-color:var(--card); border-color:var(--line-soft); color:var(--ink) }
.btn--pill:hover{
  --bt-face:var(--btn-face-d); --bt-rim:var(--btn-rim-d); --bt-press:var(--btn-press-d);
  background-color:var(--ink); color:#fff; border-color:var(--ink);
}
.btn--pill:hover .btn__ico{
  background-color:rgba(255,255,255,.2); background-image:var(--btn-face-d); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 -4px 5px -5px rgba(0,0,0,.5);
}

.btn--solid{
  --bt-face:var(--btn-face-d); --bt-rim:var(--btn-rim-d); --bt-press:var(--btn-press-d);
  background-color:var(--ink); color:#fff;
}
.btn--solid:hover{ background-color:var(--ink-deep) }

.btn--white{ background-color:#fff; color:var(--ink) }
.btn--white:hover{ background-color:var(--sand) }

/* the ghost lies on the surface rather than above it — no dome, contact
   shadow only, so it reads as an outline until you reach for it */
.btn--ghost{
  --bt-rim:inset 0 1px 0 rgba(255,255,255,.5);
  --bt-lift:0 1px 2px rgba(99,59,44,.05);
  --bt-lift-h:var(--btn-lift);
  padding:8px 16px; background-color:transparent; background-image:none;
  border-color:var(--line); color:var(--ink); font-size:13px;
}
.btn--ghost:hover{
  --bt-rim:var(--btn-rim-d); --bt-press:var(--btn-press-d); --bt-lift-h:var(--btn-lift-h);
  background-color:var(--ink); background-image:var(--btn-face-d);
  color:#fff; border-color:var(--ink);
}

.btn--sm{ padding:9px 16px 9px 10px; font-size:13px }
.btn--sm .btn__ico{ width:20px; height:20px }
.btn--sm .btn__ico svg{ width:12px; height:12px }
.btn--block{ justify-content:center; width:100% }

/* =========================================================
   FORM PRIMITIVES
   Shared by the booking form (#contact) and the consultation page.
   The look: no real border anywhere — the reference draws its 1px rule as an
   overlay, so it never eats into the 12px padding. An inset shadow reproduces
   that and lets focus and error swap the colour without the box moving.
   ========================================================= */
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:20px }

/* ---------- fields ---------- */
.field{ display:flex; flex-direction:column; gap:10px; min-width:0 }
.field > span{
  font-family:var(--ui); font-size:14px; line-height:1.3; font-weight:500;
  color:var(--muted);
}
.field input,
.field select,
.field textarea{
  width:100%; box-sizing:border-box;
  padding:12px; border-radius:10px;
  background:var(--bg);
  /* the reference draws its 1px border as an overlay pseudo-element, so it does NOT
     eat into the 12px padding — reproduce with an inset shadow, not a real border. */
  border:0; box-shadow:inset 0 0 0 1px rgba(255,255,255,0);
  font-family:var(--ui); font-size:16px; line-height:1.2; font-weight:500;
  color:var(--ink);
  transition:box-shadow .3s cubic-bezier(.44,0,.56,1), background .3s cubic-bezier(.44,0,.56,1);
}
.field input,
.field select{ height:50px }
.field textarea{ min-height:100px; height:100px; resize:vertical; display:block }

.field input::placeholder,
.field textarea::placeholder{ color:rgba(99,59,44,.5) }
.field select:invalid{ color:rgba(99,59,44,.5) }
.field option{ color:var(--ink) }

.field input:focus,
.field select:focus,
.field textarea:focus{
  outline:none; box-shadow:inset 0 0 0 1px var(--ink);
}
.field select{
  appearance:none; cursor:pointer; padding-right:36px;
  /* reference chevron: 16x16 mask, path M3.5 6 L8 10.5 L12.5 6, 1.5 stroke, #999 */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%23999999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; background-size:16px 16px;
}
.field.is-error input,
.field.is-error select,
.field.is-error textarea{ box-shadow:inset 0 0 0 1px #c4553f }

/* Inline validation line, written by script.js under whatever failed.
   Stacked on a phone the form runs ~1300px, so the note under the button is
   too far from the field it is about to be read as an answer — this one sits
   on the problem. Hosts are flex columns, so it lands under the control. */
.field__msg{
  margin:0;
  font-family:var(--ui); font-size:13px; line-height:1.4; font-weight:500;
  color:#c4553f;
}

/* ---------- consent ---------- */
.check{
  display:flex; align-items:center; gap:10px; cursor:pointer;
  font-family:var(--ui); font-size:14px; line-height:1.3; font-weight:500;
  color:var(--muted);
}
.check input{ position:absolute; opacity:0; width:0; height:0 }
.check__box{
  width:20px; height:20px; border-radius:4px; flex:none;
  border:1px solid rgba(168,91,102,.5); background:var(--bg);
  display:grid; place-items:center;
  transition:background .25s var(--ease), border-color .25s var(--ease);
}
/* reference tick: 16x16 mask, M 4 8 L 6.5 10.5 L 11.5 5.5, stroke-width 2, contain */
.check__box::after{
  content:""; width:100%; height:100%; background:#fff; opacity:0;
  transition:opacity .25s var(--ease-out);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M 4 8 L 6.5 10.5 L 11.5 5.5' fill='transparent' stroke-width='2' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M 4 8 L 6.5 10.5 L 11.5 5.5' fill='transparent' stroke-width='2' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.check input:checked + .check__box{ background:var(--ink); border-color:var(--ink) }
.check input:checked + .check__box::after{ opacity:1 }
/* reference text block is exactly 18px tall inside the 20px row — keep the height
   integral so the flex centring lands on a whole pixel like the reference does. */
.check__txt{ flex:1 1 auto; line-height:18px }

/* the one-line status under a form: "Booking your appointment…", or why it
   did not go through. Empty is the resting state, so it takes no space. */
.form-note{
  font-family:var(--ui); font-size:14px; line-height:1.3; font-weight:500;
  color:var(--accent); margin:0;
}
.form-note:empty{ display:none }

/* two columns is a desktop luxury: side by side on a phone each field is
   ~150px wide and an email address scrolls inside its own box. */
@media (max-width:620px){
  .grid2{ grid-template-columns:1fr }
}

/* generic spin — used by the hero treatment ring */
@keyframes spin{ to{ transform:rotate(360deg) } }

/* =========================================================
   ANIMATION UTILITIES
   ========================================================= */
.reveal{
  opacity:0; transform:translateY(26px);
  transition:opacity .85s var(--ease-out) var(--d,0s), transform .85s var(--ease-out) var(--d,0s);
}
.reveal.is-in{ opacity:1; transform:none }

.fade-up{
  opacity:0; transform:translateY(22px);
  animation:fadeUp .95s var(--ease-out) var(--d,0s) forwards;
}
@keyframes fadeUp{ to{ opacity:1; transform:none } }

/* split text */
.split .w{ display:inline-block; overflow:hidden; vertical-align:top }
.split .w > span{
  display:inline-block;
  transform:translateY(105%);
  transition:transform .9s var(--ease-out) var(--wd,0s);
}
.split.is-in .w > span{ transform:none }
.reveal-now .split .w > span{ transform:translateY(105%) }

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important; animation-iteration-count:1 !important;
    transition-duration:.001ms !important; scroll-behavior:auto !important;
  }
  .reveal{ opacity:1; transform:none }
  .fade-up{ opacity:1; transform:none }
  .split .w > span{ transform:none }
}
