/* M&T Surface Protectors — Mobile design tokens & base styles
   Designed at 390px (iPhone 13/14 standard width).
   Inherits visual language from the desktop site, tuned for thumb. */

:root{
  --bone: #F5F2ED;
  --bone-2: #EEE9DF;
  --ink: #141412;
  --ink-2: #2A2724;
  --mute: #6B645B;
  --line: #D9D2C6;
  --maroon: #6B1416;
  --maroon-2: #8B1C1E;
  --bronze: #E8D4A8;
  --gold: #C9A961;
  --cream: #FBF9F5;
  --black: #0A0908;

  --nav-h: 56px;
  --sticky-h: 68px;
  --gutter: 20px;
  --gutter-lg: 24px;
}

*{box-sizing:border-box; margin:0; padding:0;}
html,body{
  background:var(--bone);
  color:var(--ink);
  font-family:'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing:antialiased;
  font-weight:400;
  font-size:15px;
  line-height:1.5;
}
body{overflow-x:hidden;}
a{color:inherit; text-decoration:none;}
button{font:inherit; cursor:pointer; border:none; background:none; color:inherit;}

.serif{font-family:'Instrument Serif','Times New Roman',serif; font-weight:400; letter-spacing:-0.01em;}
.mono{font-family:'JetBrains Mono',monospace; font-weight:400;}

.eyebrow{
  font-family:'JetBrains Mono',monospace;
  font-size:10px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--mute);
}

.container{
  padding-left:var(--gutter);
  padding-right:var(--gutter);
}

::selection{background:var(--ink); color:var(--bone);}

.no-scrollbar::-webkit-scrollbar{display:none;}
.no-scrollbar{-ms-overflow-style:none; scrollbar-width:none;}

/* ──────────────── Buttons (mobile-sized; full-width by default) ──────────────── */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:16px 22px;
  border-radius:2px;
  font-size:14px;
  font-weight:500;
  letter-spacing:0.02em;
  transition: all .25s ease;
  cursor:pointer;
  min-height:48px;
}
.btn-primary{ background:var(--ink); color:var(--bone); }
.btn-primary:active{ background:var(--maroon); transform:scale(0.98); }
.btn-ghost{ border:1px solid var(--line); color:var(--ink); background:transparent; }
.btn-ghost:active{ border-color:var(--ink); }
.btn-light{ background:var(--bone); color:var(--ink); }
.btn-block{ width:100%; }

/* ──────────────── Reveal animations ──────────────── */
@keyframes rise { from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:none;} }
@keyframes fadein { from{opacity:0;} to{opacity:1;} }
.rise{ animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.rise-d1{ animation-delay:.08s; }
.rise-d2{ animation-delay:.18s; }
.rise-d3{ animation-delay:.28s; }
.rise-d4{ animation-delay:.38s; }

/* ──────────────── Page chrome — nav + sticky CTA ──────────────── */
.m-nav{
  position:fixed; top:0; left:0; right:0; z-index:50;
  height:var(--nav-h);
  background:rgba(245,242,237,0.78);
  backdrop-filter:blur(20px) saturate(1.4);
  -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border-bottom:1px solid rgba(217,210,198,0.4);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 var(--gutter);
  transition: background .3s, border-color .3s;
}
.m-nav.scrolled{ background:rgba(245,242,237,0.92); border-bottom-color:rgba(217,210,198,0.7); }

.m-nav__logo{ display:flex; align-items:center; gap:8px; }
.m-nav__logo img{ height:30px; width:auto; display:block; }
.m-nav__logo span{ font-family:'Instrument Serif',serif; font-size:14px; letter-spacing:-0.01em; line-height:1; }

.m-nav__burger{
  width:42px; height:42px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:5px; padding:0; background:transparent; border:none;
}
.m-nav__burger span{ display:block; width:18px; height:1.5px; background:var(--ink); transition: transform .3s, opacity .3s; }
.m-nav__burger.open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.m-nav__burger.open span:nth-child(2){ opacity: 0; }
.m-nav__burger.open span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

/* Sticky bottom CTA */
.m-sticky{
  position:fixed; bottom:0; left:0; right:0; z-index:48;
  height:var(--sticky-h);
  padding:10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background:rgba(20,20,18,0.95);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  display:flex; align-items:center; gap:10px;
  transform:translateY(0);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), opacity .3s;
  border-top:1px solid rgba(245,242,237,0.08);
}
.m-sticky.hidden{ transform: translateY(120%); }
.m-sticky__btn{
  flex:1;
  background:var(--bone); color:var(--ink);
  padding:14px 18px;
  font-size:13px; font-weight:500; letter-spacing:0.02em;
  display:flex; align-items:center; justify-content:center; gap:8px;
  border-radius:2px;
  min-height:48px;
}
.m-sticky__call{
  width:48px; height:48px;
  border:1px solid rgba(245,242,237,0.2);
  color:var(--bone);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  border-radius:2px;
}

/* Account for sticky CTA at end of pages */
.has-sticky{ padding-bottom: calc(var(--sticky-h) + 20px); }

/* ──────────────── Full-screen menu overlay ──────────────── */
.m-menu{
  position:fixed; inset:0; z-index:60;
  background:var(--bone);
  display:flex; flex-direction:column;
  transform:translateY(-100%);
  transition: transform .5s cubic-bezier(.7,0,.3,1);
  overflow:hidden;
}
.m-menu.open{ transform:translateY(0); }
.m-menu__head{
  height:var(--nav-h);
  padding:0 var(--gutter);
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.m-menu__body{ flex:1; padding:40px var(--gutter) 20px; overflow-y:auto; }
.m-menu__link{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 0;
  border-bottom:1px solid var(--line);
  font-family:'Instrument Serif',serif;
  font-size:34px;
  letter-spacing:-0.01em;
  color:var(--ink);
  transition: opacity .3s, transform .5s cubic-bezier(.2,.7,.2,1);
}
.m-menu__link em{
  font-family:'JetBrains Mono',monospace;
  font-style:normal;
  font-size:10px;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:var(--mute);
}
.m-menu__foot{
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  background:var(--cream);
}

/* ──────────────── Inquiry sheet (bottom sheet wizard) ──────────────── */
.m-sheet-backdrop{
  position:fixed; inset:0; z-index:80;
  background:rgba(10,9,8,0.6);
  opacity:0; pointer-events:none; transition: opacity .3s;
}
.m-sheet-backdrop.open{ opacity:1; pointer-events:auto; }
.m-sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:81;
  max-height:92vh;
  background:var(--bone);
  border-radius:24px 24px 0 0;
  transform:translateY(100%);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  display:flex; flex-direction:column;
  overflow:hidden;
}
.m-sheet.open{ transform:translateY(0); }
.m-sheet__handle{
  width:40px; height:4px; border-radius:2px; background:var(--line);
  margin:10px auto 0;
}
.m-sheet__head{
  padding:18px var(--gutter) 12px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.m-sheet__body{
  flex:1; overflow-y:auto; padding:24px var(--gutter);
}
.m-sheet__foot{
  padding:14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  background:var(--cream);
  display:flex; gap:10px;
}

/* ──────────────── Section spacing helpers ──────────────── */
.section{ padding: 60px 0; }
.section-sm{ padding: 40px 0; }
.section-lg{ padding: 80px 0; }

.h-display{
  font-family:'Instrument Serif',serif;
  font-weight:400;
  font-size: 52px;
  line-height: 1.0;
  letter-spacing:-0.02em;
}
.h-large{
  font-family:'Instrument Serif',serif;
  font-weight:400;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing:-0.02em;
}
.h-med{
  font-family:'Instrument Serif',serif;
  font-weight:400;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing:-0.015em;
}

.body{ font-size:15px; line-height:1.6; color:var(--ink-2); }
.body-sm{ font-size:13px; line-height:1.55; color:var(--mute); }

/* Card */
.card{
  background:var(--cream);
  border:1px solid var(--line);
}

/* Stars */
.stars{ display:inline-flex; gap:2px; }
.stars svg{ width:11px; height:11px; fill:var(--ink); }

/* Helper for image placeholders */
.img-wrap{ overflow:hidden; position:relative; background:var(--bone-2); }
.img-wrap img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Snap carousel */
.snap-row{
  display:flex; gap:12px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-padding-left:var(--gutter);
  padding: 0 var(--gutter) 8px;
  -webkit-overflow-scrolling:touch;
}
.snap-row > *{ scroll-snap-align:start; flex-shrink:0; }

/* ──────────────── Responsive scaling across phone resolutions ────────────────
   The layout above is authored at 390px (iPhone 13/14). These media queries
   keep it comfortable across the full range the mobile site can be served on:
   compact 320px phones, large 430px phones, and landscape phones / small
   tablets up to the 760px redirect threshold. */

/* Compact phones — iPhone SE, Galaxy S-mini, older Androids (≤360px wide) */
@media (max-width: 360px){
  :root{ --gutter:16px; --gutter-lg:18px; }
  html,body{ font-size:14px; }
  .h-display{ font-size:44px; }
  .h-large{ font-size:34px; }
  .h-med{ font-size:25px; }
  .m-menu__link{ font-size:30px; }
  .btn{ padding:15px 18px; }
}

/* Large phones — iPhone Pro Max, Pixel Pro, Galaxy Ultra (≥414px wide) */
@media (min-width: 414px){
  :root{ --gutter:24px; --gutter-lg:28px; }
  .h-display{ font-size:56px; }
  .h-large{ font-size:43px; }
  .h-med{ font-size:30px; }
}

/* Landscape phones & small tablets (≥600px): the design is meant to be read in
   a single thumb-width column, so cap the readable content and centre it
   rather than letting type and cards stretch edge-to-edge. Full-bleed elements
   (hero, snap carousels, fixed nav/sticky bar) intentionally still span the
   viewport. */
@media (min-width: 600px){
  .container{
    max-width:600px;
    margin-left:auto;
    margin-right:auto;
  }
  .h-display{ font-size:60px; }
  .m-menu__body,
  .m-sheet__body,
  .m-sheet__head,
  .m-sheet__foot{
    max-width:600px;
    margin-left:auto;
    margin-right:auto;
    width:100%;
  }
}
