/* ==========================================================================
   MIRAVEL — SHARED SITE STYLES
   Reset, tokens, fonts, base, header, footer, shared interactions and reveals.
   ========================================================================== */

/* ==========================================================================
   main styles — site-wide
   ========================================================================== */

/* --- Reset --- */
*,*::before,*::after{box-sizing:border-box}
html:focus-within{scroll-behavior:smooth}
html,body{height:100%}
body{margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
img,svg,video,canvas{display:block;max-width:100%;height:auto}
input,button,textarea,select{font:inherit}
:where(h1,h2,h3){text-wrap:balance}

/* --- Tokens --- */
:root{

  color-scheme: only light;

  /* Masthead */
  --masthead-bg:#A15D66;
  --masthead-ink:#F2ECEA;

  /* Page */
  --page-bg:#F2ECEA;
  --page-ink:#0b1b34;
  --page-muted:#6b7280;

  /* Accents */
  --accent:#A15D66;
  --accent-ink:#A15D66;
  --rule:#d8cfc0;

  /* Layout */
  --g:clamp(16px,4vw,48px);
  --container:1200px;
  --left-col:minmax(300px,440px);

  /* Spotlight disc (hero) */
  --reveal-r:clamp(54px,7vw,96px);
  --reveal-x:50%;
  --reveal-y:50%;

  /* Footer (dark) */
  --footer-bg:#242323;
  --footer-ink:#F2ECEA;
  --footer-pill:#F2ECEA;

  /* Misc */
  --radius-2:12px;
  --radius-3:22px;
  --shadow-1:0 4px 24px rgba(15,23,42,.08);

  /* Case study palette */
  --cs-cream:#F2ECEA;
  --cs-ink:#232222;
  --cs-dark:#232222;
}

/* --- Fonts --- */
@font-face{
  font-family:"Griffiths";
  src:
  url("assets/fonts/Griffiths/Griffiths-Regular.woff") format("woff"),
  url("assets/fonts/Griffiths/Griffiths-Regular.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family: "Cormorant";
  src:
    url("/assets/fonts/Cormorant/Cormorant-Light.woff2") format("woff2"),
    url("/assets/fonts/Cormorant/Cormorant-Light.woff")  format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family:"Satoshi";
  src:
  url("assets/fonts/Satoshi/Satoshi-Regular.woff2") format("woff2"), 
  url("assets/fonts/Satoshi/Satoshi-LightItalic.woff") format("woff");
  font-weight:300 900;
  font-style:normal;
  font-display:swap;
}

/* --- Base --- */
body{
  font-family:"Satoshi",system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,sans-serif;
  line-height:1.5;
  background:var(--page-bg);
  color:var(--page-ink);
}
.wrap{margin-inline:auto;padding-inline:var(--g)}


/* =========================
   MASTHEAD / HEADER (fixed)
   ========================= */

/* Home masthead behind hero (mauve) */
.masthead{
  background: var(--masthead-bg);
  color: var(--masthead-ink);
}

/* Core header — fixed so it persists past the hero */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: clamp(10px,1.6vw,16px) var(--g);
  background: transparent;  /* transparent over hero */
  color: inherit;
  box-shadow: none;

  transform: translateY(0);
  transition:
    transform .25s ease,
    background-color .25s ease,
    color .25s ease,
    box-shadow .25s ease;
  will-change: transform;
}

/* Hide while scrolling down */
body.header-hidden .site-header {
  transform: translateY(-100%);
  pointer-events: none;
}

.brand__logo{height:56px;width:auto;display:block}

/* Navigation */
.nav ul{display:flex;gap:clamp(22px,3.4vw,44px);list-style:none;margin:0;padding:0;text-align: center;}
.nav a{color:inherit;text-decoration:none;font-weight:600;letter-spacing:.01em;opacity:.95}
.nav a:hover,.nav a:focus-visible{opacity:1;text-decoration:none;}
.btn-ghost{padding:.5rem .9rem;border:1px solid currentColor;border-radius:999px;text-decoration:none}

/* Header becomes solid after the hero on the index page */
body.header-solid .site-header{
  background: var(--page-bg);         
  color: #A15D66;
  
}
body.header-solid .btn-ghost{ border-color: currentColor; }



/* Overlay (white) variant if you ever need header over imagery */
.header-overlay .site-header,
.header-overlay .site-header a,
.header-overlay .btn-ghost{
  border-color: currentColor;
  background: transparent;
  box-shadow: none;
}

/* =========================
   MOBILE HEADER / NAV
   ========================= */

.nav-toggle{
  display:none;
  inline-size:50px;
  block-size:50px;
  padding:0;
  border:1.5px solid currentColor;
  border-radius:12px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  position:relative;
  z-index:1102;
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    transform .2s ease;
}

.hamburger,
.hamburger::before,
.hamburger::after{
  display:block;
  inline-size:22px;
  block-size:2px;
  background:currentColor;
  border-radius:999px;
  margin-inline:auto;
  position:relative;
  transition:
    transform .3s cubic-bezier(.2,.75,.2,1),
    opacity .2s ease,
    top .3s cubic-bezier(.2,.75,.2,1);
}

.hamburger::before,
.hamburger::after{
  content:"";
  position:absolute;
  left:0;
}

.hamburger::before{top:-7px}
.hamburger::after{top:7px}

@media (max-width:720px){
  .site-header{
    padding:16px clamp(20px,5vw,28px);
    z-index:1101;
    transition:
      background-color .3s ease,
      color .3s ease,
      transform .25s ease,
      box-shadow .3s ease;
  }

  .brand{
    position:relative;
    z-index:1102;
  }

  .brand__logo{
    height:clamp(50px,13vw,60px);
    width:auto;
  }

  .nav-toggle{
    display:grid;
    place-items:center;
    flex:0 0 auto;
  }

  body.menu-open .site-header{
    background:#F2ECEA;
    color:#A15D66;
    box-shadow:none;
    transform:translateY(0) !important;
  }

  body.menu-open .hamburger{
    background:transparent;
  }

  body.menu-open .hamburger::before{
    top:0;
    transform:rotate(45deg);
  }

  body.menu-open .hamburger::after{
    top:0;
    transform:rotate(-45deg);
  }

  .nav{
    position:fixed;
    inset:0;
    width:100%;
    height:100dvh;
    margin:0;
    padding:
      calc(var(--header-h,82px) + 40px)
      clamp(24px,7vw,48px)
      40px;
    box-sizing:border-box;
    background:#F2ECEA;
    color:#A15D66;
    border-radius:0;
    box-shadow:none;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(-18px);
    transition:
      opacity .3s ease,
      transform .35s cubic-bezier(.2,.75,.2,1),
      visibility .3s ease;
    z-index:1100;
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  .nav.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0);
  }

  .nav ul{
    width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    list-style:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:clamp(28px,5vh,40px);
    text-align:center;
  }

  .nav li{
    opacity:0;
    transform:translateY(12px);
    transition:
      opacity .35s ease,
      transform .45s cubic-bezier(.2,.75,.2,1);
  }

  .nav.open li{
    opacity:1;
    transform:translateY(0);
  }

  .nav.open li:nth-child(1){transition-delay:.05s}
  .nav.open li:nth-child(2){transition-delay:.10s}
  .nav.open li:nth-child(3){transition-delay:.15s}
  .nav.open li:nth-child(4){transition-delay:.20s}

  .nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    padding:0;
    color:#A15D66;
    text-decoration:none;
    font-family:"Satoshi",system-ui,sans-serif;
    font-weight:400;
    font-size:clamp(20px,5vw,24px);
    line-height:1.2;
    letter-spacing:-.01em;
    text-align:center;
    opacity:1;
    transition:
      opacity .2s ease,
      transform .2s ease;
  }

  .nav a:hover,
  .nav a:focus-visible{
    opacity:.72;
    transform:translateY(-1px);
  }

  .nav .btn-ghost{
    padding:12px 22px;
    border:1px solid #A15D66;
    border-radius:999px;
    background:transparent;
    color:#A15D66;
  }

  body.menu-open::after{
    display:none;
  }
}

@media (max-width:480px){
  .site-header{
    padding:14px 20px;
  }

  .brand__logo{
    height:52px;
  }

  .nav-toggle{
    inline-size:48px;
    block-size:48px;
    border-radius:11px;
  }

  .nav{
    height:100dvh;
    padding:
      calc(var(--header-h,78px) + 34px)
      20px
      32px;
  }

  .nav ul{
    gap:clamp(24px,4.5vh,34px);
  }

  .nav a{
    font-size:clamp(19px,5.5vw,22px);
  }

  .nav .btn-ghost{
    padding:11px 20px;
  }
}

@media (max-width:720px) and (max-height:680px){
  .nav{
    height:100dvh;
    padding-top:calc(var(--header-h,76px) + 24px);
    padding-bottom:24px;
  }

  .nav ul{
    gap:18px;
  }

  .nav a{
    font-size:19px;
  }

  .nav .btn-ghost{
    padding:10px 18px;
  }
}

@media (prefers-reduced-motion:reduce){
  .nav,
  .nav li,
  .hamburger,
  .hamburger::before,
  .hamburger::after{
    transition:none !important;
  }
}

/* =========================
   Cursor-follow CTA — shared
   (projects rows + .next-card)
   ========================= */
.cursor-cta{
  position:absolute; left:0; top:0;
  transform: translate(-50%,-50%) scale(.92);
  opacity:0; pointer-events:none; z-index:3;

  display:inline-flex; align-items:center; justify-content:center;
  padding:.7rem 1.1rem;
  border-radius:999px;
  font-weight:600; line-height:1;
  background: rgba(242,236,234,.92);
  color:#0b1b34;
  box-shadow: 0 12px 32px rgba(15,23,42,.18);
  backdrop-filter: saturate(1.05) blur(1.5px);

  transition: opacity .18s ease, transform .18s cubic-bezier(.2,.65,.2,1);
  will-change: transform, opacity;
}
.project-row:is(:hover,:focus-within) .cursor-cta,
.next-card:is(:hover,:focus-within) .cursor-cta{
  opacity:1;
  transform: translate(var(--cta-x,-50%),var(--cta-y,-50%)) scale(1);
}
.project-row:focus-within .cursor-cta,
.next-card:focus-visible .cursor-cta{
  left:50%; top:50%;
  --cta-x:-50%; --cta-y:-50%;
}

/* Make next-card a positioning context */
.next-card{ position:relative; overflow:visible; }

@media (hover:none),(pointer:coarse),(max-width:1024px){
  .cursor-cta{ display:none !important; }
}

/* Touch/coarse pointers: pin it bottom-left and always show */
@media (hover:none),(pointer:coarse){
  .cursor-cta{
    left:16px; top:auto; bottom:16px;
    transform:none; opacity:1;
  }
}

/* =========================
   FOOTER
   ========================= */
.site-footer{ background:var(--footer-bg); color:var(--footer-ink); padding-block:48px; }
.footer__wrap{margin-inline:auto;padding-inline:var(--g)}
.footer__top{display:grid;grid-template-columns:1fr auto;align-items:end;gap:32px}
.footer-kicker{opacity:.85;margin-bottom:.5rem}
.footer-title{display:flex;align-items:baseline;gap:.5ch;margin:0 0 .75rem 0;line-height:1.05;letter-spacing:-.02em}
.footer-title .title-main{font-weight:700;font-size:clamp(2.2rem,7vw,5rem);color:var(--footer-ink)}
.footer-title .title-accent{font-weight:700;font-style:italic;font-size:clamp(2.2rem,7vw,5rem);color:var(--accent)}
.footer-email{display:inline-block;margin-top:.6rem;color:inherit;text-decoration:none;border-bottom:2px solid color-mix(in srgb,var(--footer-ink) 45%, transparent);padding-bottom:.25rem}
.social{display:flex;flex-wrap:wrap;gap:16px;list-style:none;margin:0;padding:0;align-items:center}
.social__btn{--btn:56px;--icon:26px;inline-size:var(--btn);block-size:var(--btn);display:grid;place-items:center;border-radius:50%;background:var(--footer-pill);box-shadow:0 2px 10px rgba(0,0,0,.25);text-decoration:none;transition:box-shadow .2s,transform .2s;color:#232323}
.icon-img,.icon-svg{inline-size:var(--icon);block-size:var(--icon);display:block;fill:#A15D66}
.social__btn:hover,.social__btn:focus-visible{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,.35)}
.footer__bottom{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;margin-top:36px;padding-top:24px;border-top:1px solid rgba(243,238,215,.08)}
.footer__nav{display:flex;gap:24px;flex-wrap:wrap}
.footer__nav a{color:var(--footer-ink);text-decoration:none;opacity:.95}
.footer__nav a:hover{opacity:1}
.footer__logo{width:110px;height:auto;opacity:.95;justify-self:center;filter:none}
.footer__phone{justify-self:end;text-align:right;margin:0;color:var(--footer-ink)}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto !important}
}

/* =========================
   SCROLL REVEAL (supports .reveal and [data-reveal])
   ========================= */
@media (prefers-reduced-motion:no-preference){
  .reveal,[data-reveal]{opacity:0;transform:translateY(24px);filter:blur(2px);
    transition:opacity .6s ease,transform .6s cubic-bezier(.2,.65,.2,1),filter .6s ease;
    will-change:opacity,transform,filter;transition-delay:var(--reveal-delay,0ms);}
  [data-reveal="up"]{ transform:translateY(24px); }
  [data-reveal="down"]{ transform:translateY(-24px); }
  [data-reveal="zoom"]{ transform:scale(.96); }
  .reveal.is-inview,[data-reveal].is-inview{opacity:1;transform:none;filter:none}
  [data-stagger] > *{ --stagger-step:110ms; transition-delay: calc(var(--i, 0) * var(--stagger-step)); }
}

/* =========================
   FOOTER — stacked on small screens
   ========================= */
@media (max-width: 820px){
  .site-footer{ padding-block: 36px; }

  .footer__top{ grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .ft-left{ order: 1; }
  .footer-title{ flex-wrap: wrap; gap: .35ch; line-height: 1.06; }
  .footer-email{ display: inline-block; margin-top: .4rem; word-break: break-word; }

  .social{ order: 2; justify-content: flex-start; gap: 12px; }

  .footer__bottom{ grid-template-columns: 1fr; gap: 14px; margin-top: 28px; padding-top: 18px; }

  .footer__nav{ order: 1; flex-direction: column; align-items: flex-start; gap: 10px; }

  .footer__logo{ order: 2; justify-self: start; margin: 6px 0; width: 96px; }

  .footer__phone{ order: 3; justify-self: start; text-align: left; line-height: 1.4; word-break: break-word; }
}