/* ==========================================================================
   Brand Brew Media — shared responsive layer
   Loaded after each page's own <style>, so it can complete and correct it.
   1. Global safety      2. Dark content wrapper   3. Missing components
   4. Contact page       5. Contrast fixes         6. Tablet (≤1024px)
   7. Mobile (≤768px)    8. Small phones (≤400px)  9. Motion preferences
   ========================================================================== */

/* ── 1. GLOBAL SAFETY ─────────────────────────────────────────────────── */
html,body{overflow-x:clip;max-width:100%;}
@supports not (overflow:clip){html,body{overflow-x:hidden;}}
img,svg,video,iframe{max-width:100%;}
img{height:auto;}
.nav-logo img{height:48px;width:auto;}
body{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
a,button{-webkit-tap-highlight-color:rgba(108,67,35,.15);}
:focus-visible{outline:2px solid var(--gold,#c9a96e);outline-offset:3px;}

/* ── 2. DARK CONTENT WRAPPER ──────────────────────────────────────────────
   On these pages the content used to sit (by accident) inside the marquee
   strip and inherited its brown background. It now has its own wrapper with
   the same look, without the marquee's nowrap/overflow side effects.       */
.bb-dark{
  background:linear-gradient(90deg,var(--coffee-dark) 0%,var(--coffee) 50%,var(--coffee-dark) 100%);
  color:rgba(250,248,242,.78);
  white-space:normal;
}
.bb-dark footer{color:rgba(250,248,242,.58);}

/* ── 3. COMPONENTS THAT HAD NO BASE STYLES ────────────────────────────── */

/* Page banner tagline (service pages) */
.page-banner .tagline{color:rgba(250,248,242,.72);}

/* Process / "Four Blends" phases */
.process-section .section-title{margin-bottom:44px;}
.phases-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;}
.phases-grid.cols3{grid-template-columns:repeat(3,minmax(0,1fr));}
.phases-grid.cols4{grid-template-columns:repeat(4,minmax(0,1fr));}
.phase-card{
  position:relative;overflow:hidden;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(201,169,110,.22);
  border-radius:16px;padding:30px 24px 28px;
  transition:background .3s,transform .3s,border-color .3s;
}
.phase-card::after{
  content:attr(data-num);position:absolute;top:-6px;right:14px;
  font-family:'Cormorant Garamond',serif;font-size:5.5rem;font-weight:700;line-height:1;
  color:rgba(250,248,242,.06);pointer-events:none;
}
.phase-card:hover{background:rgba(255,255,255,.12);border-color:rgba(201,169,110,.5);transform:translateY(-4px);}
.phase-label{
  font-family:'Space Mono',monospace;font-size:.64rem;letter-spacing:.2em;text-transform:uppercase;
  color:var(--gold);margin-bottom:10px;
}
.phase-card h3{
  font-family:'Cormorant Garamond',serif;font-size:1.4rem;font-weight:700;
  color:var(--offwhite);margin-bottom:14px;line-height:1.2;
}
.phase-items{list-style:none;margin:0;padding:0;}
.phase-items li{
  position:relative;padding-left:18px;margin-bottom:9px;
  font-size:.86rem;line-height:1.6;font-weight:300;color:rgba(250,248,242,.72);
}
.phase-items li::before{content:'✦';position:absolute;left:0;top:1px;font-size:.6rem;color:var(--gold);}

/* Stats bar (service pages) */
.stats-bar{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  margin:0 60px;border-top:1px solid rgba(201,169,110,.2);border-bottom:1px solid rgba(201,169,110,.2);
}
.stat-item{padding:34px 20px;text-align:center;}
.stat-item + .stat-item{border-left:1px solid rgba(201,169,110,.2);}
.bb-dark .stat-num{color:var(--gold-light);}
.bb-dark .stat-label{color:rgba(250,248,242,.6);}

/* "Why" strip (variant of .why-section used on some service pages) */
.why-strip{padding:90px 60px;}
.why-strip .section-title{margin-bottom:40px;}
.why-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}

/* "Explore what else we brew" cards */
.other-section .section-title{margin-bottom:36px;}
.other-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;}
.other-card{
  display:block;text-decoration:none;
  background:rgba(255,255,255,.07);border:1px solid rgba(201,169,110,.22);
  border-radius:14px;padding:24px 22px;
  transition:background .3s,transform .3s,border-color .3s;
}
.other-card:hover{background:rgba(255,255,255,.13);border-color:rgba(201,169,110,.55);transform:translateY(-4px);}
.oc-icon{display:block;font-size:1.5rem;margin-bottom:12px;}
.other-card h3{
  font-family:'Cormorant Garamond',serif;font-size:1.2rem;font-weight:700;
  color:var(--offwhite);margin-bottom:6px;
}
.other-card p{font-size:.82rem;line-height:1.6;font-weight:300;color:rgba(250,248,242,.62);}
/* same cards on a light background (page without the dark wrapper) */
body:not(:has(.bb-dark)) .other-card{background:var(--white);border-color:rgba(108,67,35,.12);box-shadow:0 4px 20px var(--shadow-warm);}
body:not(:has(.bb-dark)) .other-card h3{color:var(--coffee);}
body:not(:has(.bb-dark)) .other-card p{color:var(--rust);}

/* ── 4. CONTACT PAGE ──────────────────────────────────────────────────── */
.contact-body{
  display:grid;grid-template-columns:1fr 1.15fr;gap:60px;align-items:start;
  max-width:1200px;margin:0 auto;padding:90px 60px;
}
.contact-info > p{font-size:.95rem;line-height:1.85;color:var(--rust);font-weight:300;margin:16px 0 30px;max-width:460px;}
.info-block{display:flex;gap:16px;align-items:flex-start;margin-bottom:22px;}
.info-icon{
  width:46px;height:46px;flex-shrink:0;border-radius:12px;
  display:flex;align-items:center;justify-content:center;font-size:1.15rem;
  background:var(--white);border:1px solid rgba(108,67,35,.12);box-shadow:0 4px 14px var(--shadow-warm);
}
.info-block h4{
  font-family:'Space Mono',monospace;font-size:.64rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--coffee);margin-bottom:4px;
}
.info-block a,.info-block p{font-size:.96rem;color:var(--charcoal);text-decoration:none;line-height:1.5;word-break:break-word;}
.info-block a{display:inline-block;padding:8px 0;margin:-8px 0;}
.info-block a:hover{color:var(--coffee);}
.social-group{margin-top:30px;}
.social-group h4{
  font-family:'Space Mono',monospace;font-size:.64rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--coffee);margin-bottom:12px;
}
.social-pills{display:flex;flex-wrap:wrap;gap:10px;}
.social-pill{
  display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 18px;
  border-radius:999px;border:1.5px solid rgba(108,67,35,.25);
  color:var(--coffee);text-decoration:none;font-size:.86rem;font-weight:500;
  transition:background .2s,color .2s,border-color .2s;
}
.social-pill:hover{background:var(--coffee);border-color:var(--coffee);color:var(--offwhite);}

.form-card{
  background:var(--white);border-radius:20px;padding:40px 36px;
  border:1px solid rgba(108,67,35,.1);box-shadow:0 18px 50px rgba(108,67,35,.12);
}
.form-card h3{font-family:'Cormorant Garamond',serif;font-size:1.9rem;font-weight:700;color:var(--coffee);margin-bottom:6px;}
.form-card .subtitle{font-size:.9rem;color:var(--rust);font-weight:300;margin-bottom:26px;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.fg{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;min-width:0;}
.fg label{font-size:.74rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--charcoal);}
.fg input,.fg select,.fg textarea{
  width:100%;font:inherit;font-size:16px; /* 16px stops iOS zooming into fields */
  color:var(--charcoal);background:var(--offwhite);
  border:1.5px solid rgba(108,67,35,.16);border-radius:10px;
  padding:13px 14px;min-height:48px;
  transition:border-color .2s,box-shadow .2s,background .2s;
  -webkit-appearance:none;appearance:none;
}
.fg select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236C4323' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px;
}
.fg textarea{min-height:130px;resize:vertical;line-height:1.6;}
.fg input:focus,.fg select:focus,.fg textarea:focus{
  outline:none;border-color:var(--coffee);background:var(--white);box-shadow:0 0 0 3px rgba(108,67,35,.12);
}
.form-submit{
  width:100%;min-height:52px;margin-top:6px;border:0;border-radius:10px;cursor:pointer;
  background:linear-gradient(135deg,var(--coffee) 0%,var(--coffee-dark) 100%);color:var(--offwhite);
  font:inherit;font-size:.82rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;
  box-shadow:0 6px 20px rgba(108,67,35,.3);transition:transform .2s,box-shadow .2s;
}
.form-submit:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(108,67,35,.4);}

.map-wrap{padding:0 60px 90px;max-width:1320px;margin:0 auto;}
.map-inner{border-radius:20px;overflow:hidden;border:1px solid rgba(108,67,35,.12);box-shadow:0 12px 40px var(--shadow-warm);height:380px;}
.map-inner iframe{display:block;width:100%;height:100%;border:0;}

/* ── 5. CONTRAST FIXES ────────────────────────────────────────────────── */
/* Headings that were white on the light off-white background */
.page-index #about .section-title,
.page-index #services .section-title,
.page-index .team-section .section-title,
.page-contact .contact-info .section-title,
.page-about .learning-section .section-title{color:var(--coffee)!important;} /* !important beats inline color:#fff */
/* Small gold labels on light backgrounds: a deeper gold so they stay legible */
.page-index .hero-eyebrow,
.page-index .stat-label,.page-index .stat-lbl,.page-index .story-badge .lbl,
.page-index #about .section-label,.page-index #services .section-label,
.page-index .team-section .section-label,.page-index .team-role,
.page-contact .contact-info .section-label,
.page-about .learning-section .section-label,
.page-services .service-row.alt .section-label{color:#94702f!important;}
.page-about .learning-section{color:var(--charcoal);}
/* Body copy that was rust-brown on the brown background */
.bb-dark .story-content p{color:rgba(250,248,242,.78);}
.bb-dark .section-label{color:var(--gold-light);}
/* Fine print in the footer */
footer .footer-col h4{color:rgba(232,201,138,.72);}
.footer-bottom{color:rgba(250,248,242,.5);}
.footer-bottom a{color:rgba(250,248,242,.6);}

/* ── 6. TABLET ≤1024px ────────────────────────────────────────────────── */
@media (max-width:1024px){
  .phases-grid,.phases-grid.cols4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .phases-grid.cols3{grid-template-columns:repeat(3,minmax(0,1fr));}
  .why-cards{grid-template-columns:repeat(2,minmax(0,1fr));}
  .stats-bar{margin:0 40px;}
  .contact-body{grid-template-columns:1fr;gap:44px;padding:70px 40px;max-width:760px;}
  .map-wrap{padding:0 40px 70px;}
  .service-row{grid-template-columns:1fr!important;gap:36px!important;}
}

/* ── 7. MOBILE ≤768px ─────────────────────────────────────────────────── */
@media (max-width:768px){
  /* Nav: bigger tap target for the menu button */
  .nav-hamburger{width:44px!important;height:44px!important;padding:11px 6px!important;right:12px!important;box-sizing:border-box;}
  .nav-links a{min-height:44px;}
  .nav-links .dropdown-menu li a{display:flex;align-items:center;}

  /* Spacing */
  section,.why-strip,.why-section{padding:56px 20px!important;}
  .page-banner{padding:120px 22px 80px!important;min-height:0!important;}
  .page-banner h1{font-size:clamp(2.2rem,9vw,3rem)!important;}

  /* Forced line breaks were written for wide screens — let text flow */
  p br,li br,.story-content p br,.svc-content p br,.page-banner p br,.cta-band p br,.footer-brand p br{display:none;}

  /* Oversized inline headings (style="font-size:48px") */
  span[style*="font-size: 48px"],span[style*="font-size:48px"]{
    display:block;font-size:clamp(2rem,8.5vw,2.6rem)!important;line-height:1.12;margin-bottom:16px;
  }
  span[style*="font-size: 15px"]{font-size:.95rem!important;line-height:1.75;}

  /* Story / image blocks */
  .story{gap:28px!important;}
  .story-visual{width:100%!important;height:auto!important;aspect-ratio:1/1;max-width:420px;margin:0 auto;}
  .story-visual-inner img{width:100%;height:100%;object-fit:cover;}
  .story-content{max-width:none;}
  .story-content p{max-width:none!important;}
  .page-index .story-visual{aspect-ratio:auto;height:280px!important;}
  .page-index .story-visual-inner img{object-fit:contain;padding:18px;}
  .page-index .story-badge{right:10px!important;bottom:-18px!important;}
  .service-row img{width:100%;border-radius:16px;}
  .service-row ul{padding-left:18px;}
  .service-row li{line-height:1.6;margin-bottom:7px;}

  /* Grids */
  .phases-grid,.phases-grid.cols3,.phases-grid.cols4,.why-cards,.other-grid{grid-template-columns:1fr!important;gap:14px!important;}
  .phase-card{padding:24px 20px!important;}
  .stats-bar{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 20px;}
  .stat-item{padding:24px 10px;}
  .stat-item + .stat-item{border-left:0;}
  .stat-item:nth-child(even){border-left:1px solid rgba(201,169,110,.2);}
  .stat-item:nth-child(n+3){border-top:1px solid rgba(201,169,110,.2);}

  /* Buttons: full-width, easy to tap */
  .btn-primary,.btn-outline,.btn-white{min-height:48px;display:inline-flex!important;align-items:center;justify-content:center;text-align:center;}
  .hero-btns{display:flex;flex-direction:column;gap:12px;align-items:stretch;}
  .hero-btns a{width:100%;}

  /* Contact */
  .contact-body{padding:56px 20px!important;gap:36px!important;}
  .form-card{padding:28px 20px!important;border-radius:16px;}
  .form-row{grid-template-columns:1fr!important;gap:0!important;}
  .map-wrap{padding:0 20px 56px;}
  .map-inner{height:280px;border-radius:16px;}

  /* CTA band */
  .cta-band,.cta-band-rust{padding:60px 22px!important;}
  .cta-band h2,.cta-band-rust h2{font-size:clamp(1.8rem,7.5vw,2.4rem)!important;}

  /* Footer: comfortable tap rows */
  footer{padding:50px 22px 24px!important;}
  .footer-col ul li{margin-bottom:2px;}
  .footer-col ul li a{display:inline-block;padding:8px 0;font-size:.92rem;}
  .social-btn{width:44px;height:44px;}
  .contact-item{align-items:center;}
  .footer-bottom a{display:inline-block;padding:6px 2px;}
}

/* ── 8. SMALL PHONES ≤400px ───────────────────────────────────────────── */
@media (max-width:400px){
  .stats-bar{margin:0 14px;}
  .stat-num{font-size:1.7rem!important;}
  section,.why-strip,.why-section{padding-left:16px!important;padding-right:16px!important;}
}

/* ── 9. REDUCED MOTION ────────────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
  .fade-in{opacity:1!important;transform:none!important;}
}

/* ── 10. CONTACT FORM STATES ──────────────────────────────────────────── */
.hp-field{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden;}
.fg.has-error input,.fg.has-error select,.fg.has-error textarea{border-color:#b3412e;background:#fff7f5;}
.fg-error{font-size:.78rem;color:#a63a28;font-weight:500;}
.form-status{min-height:0;font-size:.88rem;line-height:1.5;margin:4px 0 0;}
.form-status:empty{display:none;}
.form-status.is-error{color:#a63a28;background:#fbeeea;border:1px solid rgba(166,58,40,.2);border-radius:10px;padding:11px 14px;margin-bottom:6px;}
.form-submit{position:relative;}
.form-submit:disabled{cursor:progress;opacity:.85;transform:none;}
.form-submit.is-loading .btn-label::before{
  content:'';display:inline-block;width:14px;height:14px;margin-right:10px;vertical-align:-2px;
  border:2px solid rgba(250,248,242,.35);border-top-color:var(--offwhite);border-radius:50%;
  animation:bbSpin .7s linear infinite;
}
@keyframes bbSpin{to{transform:rotate(360deg)}}

/* ── 11. THANK-YOU PAGE ───────────────────────────────────────────────── */
.ty-name{font-style:normal;}
.ty-section{padding:70px 60px 100px;}
.ty-card{
  max-width:760px;margin:-40px auto 0;position:relative;z-index:2;
  background:var(--white);border-radius:24px;padding:52px 56px 44px;text-align:center;
  border:1px solid rgba(108,67,35,.1);box-shadow:0 24px 70px rgba(108,67,35,.14);
}
.ty-check{width:84px;height:84px;margin:0 auto 22px;}
.ty-check svg{width:100%;height:100%;}
.ty-check circle{stroke:var(--gold);stroke-width:2.5;stroke-dasharray:151;stroke-dashoffset:151;animation:tyDraw .8s .2s ease forwards;}
.ty-check path{stroke:var(--coffee);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40;animation:tyDraw .45s .85s ease forwards;}
@keyframes tyDraw{to{stroke-dashoffset:0}}
.ty-card .section-label{justify-content:center;color:#94702f;}
.ty-title{font-family:'Cormorant Garamond',serif;font-size:clamp(1.7rem,3.4vw,2.4rem);font-weight:700;color:var(--coffee);line-height:1.15;margin-bottom:30px;}
.ty-steps{list-style:none;margin:0 0 34px;padding:0;text-align:left;display:grid;gap:14px;}
.ty-steps li{display:flex;gap:18px;align-items:flex-start;background:var(--offwhite);border:1px solid rgba(108,67,35,.08);border-radius:14px;padding:18px 20px;}
.ty-num{font-family:'Space Mono',monospace;font-size:.78rem;font-weight:700;color:var(--offwhite);background:linear-gradient(135deg,var(--coffee),var(--coffee-dark));border-radius:10px;min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.ty-steps h3{font-family:'Cormorant Garamond',serif;font-size:1.25rem;font-weight:700;color:var(--coffee);margin-bottom:3px;}
.ty-steps p{font-size:.88rem;line-height:1.65;color:var(--rust);font-weight:300;}
.ty-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-bottom:26px;}
.ty-urgent{font-size:.86rem;color:var(--rust);line-height:1.7;}
.ty-urgent a{display:inline-block;padding:6px 0;color:var(--coffee);font-weight:600;text-decoration:none;border-bottom:1px solid rgba(108,67,35,.3);word-break:break-word;}
@media (max-width:768px){
  .ty-section{padding:40px 16px 64px!important;}
  .ty-card{padding:36px 20px 30px;border-radius:18px;margin-top:-30px;}
  .ty-check{width:68px;height:68px;}
  .ty-steps li{padding:16px;gap:14px;}
  .ty-actions{flex-direction:column;align-items:stretch;}
}
.ty-preview{background:#fff6e5;border:1px solid rgba(201,169,110,.6);color:#6b4f1d;border-radius:12px;padding:14px 16px;margin:0 0 24px;font-size:.88rem;line-height:1.6;text-align:left;}
.ty-preview strong{color:var(--coffee-dark);}
