/* SavviSound Website — styles.css */
/* Palette: teal, sage green, dusty rose, warm sand, charcoal brown */

/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #1a7a6d;
  --teal-dark: #14594f;
  --sage: #6b8f71;
  --sage-light: #e8ede9;
  --rose: #c4868b;
  --rose-hover: #b3737a;
  --sand: #f5f0e8;
  --charcoal: #3d3229;
  --white: #ffffff;
  --text: #3d3229;
  --text-light: #6b6055;
  --font: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--sand);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* ========== ANCHOR SCROLL OFFSET (account for fixed nav) ========== */
html {
  scroll-padding-top: 150px;
  scroll-behavior: smooth;
}
@media (max-width: 1100px) {
  html { scroll-padding-top: 130px; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 110px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 90px; }
}



h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: 2.6rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; margin-top: 2.5rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }

p { margin-bottom: 1.2rem; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

strong { font-weight: 700; }

/* ========== NAV BAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid #e0dbd3;
  padding: 1rem 2rem;
  height: auto;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
}

.navbar-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.navbar-logo .savvi { color: var(--teal); font-weight: 800; }

.navbar-logo svg { width: 36px; height: 36px; }

.navbar-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  list-style: none;
  flex-shrink: 1;
  flex-wrap: nowrap;
}

.navbar-links a {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  text-decoration: none;
}

.navbar-cta {
  background: var(--rose);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-cta:hover { background: var(--rose-hover); color: var(--white); text-decoration: none; }

/* Science dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  cursor: pointer;
}

.nav-dropdown > a::after {
  content: " \25BE";
  font-size: 1.7rem;
  opacity: 1;
  vertical-align: baseline;
  line-height: 0;
  position: relative;
  top: 0.1em;
}

.nav-has-chevron > a::after {
  content: " \25BE";
  font-size: 1.7rem;
  opacity: 1;
  vertical-align: baseline;
  line-height: 0;
  position: relative;
  top: 0.1em;
}

.nav-dropdown .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid #e0dbd3;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(61,50,41,0.12);
  padding: 0.8rem 0;
  min-width: 320px;
  z-index: 9999;
}

/* Invisible bridge between nav link and dropdown */
.nav-dropdown .nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

.nav-dropdown.open > .nav-dropdown-menu {
  display: block;
}

.nav-dropdown .nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text) !important;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown .nav-dropdown-menu a:hover {
  background: var(--sage-light);
  color: var(--teal) !important;
  text-decoration: none !important;
}

.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: #e0dbd3;
  margin: 0.4rem 1.5rem;
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 26px; height: 3px; background: var(--charcoal); border-radius: 2px; transition: 0.3s; }

/* ========== LAYOUT ========== */
.page-wrapper { padding-top: 140px; }

.section {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-wide {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-bg-sand { background: var(--sand); }
.section-bg-white { background: var(--white); }
.section-bg-sage { background: var(--sage-light); }
.section-bg-teal { background: var(--teal); color: var(--white); }
.section-bg-teal h1, .section-bg-teal h2, .section-bg-teal h3 { color: var(--white); }
.section-bg-teal a { color: var(--sand); }

.full-width-bg { width: 100vw; margin-left: calc(-50vw + 50%); }

/* ========== HERO ========== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(170deg, var(--sand) 0%, var(--sage-light) 50%, var(--white) 100%);
  position: relative;
}

.hero-content { max-width: 750px; }

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.hero .subheading {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.hero .patent-line {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero .price-line {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 2rem;
}

/* ========== CTA BUTTONS ========== */
.cta-button {
  display: inline-block;
  background: var(--rose);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
}

.cta-button:hover {
  background: var(--rose-hover);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-button-teal {
  background: var(--teal);
}

.cta-button-teal:hover {
  background: var(--teal-dark);
}

.cta-center { text-align: center; margin: 2.5rem 0; }

/* ========== FOUNDER SECTION ========== */
.founder-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.founder-photo {
  width: 250px;
  min-width: 250px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sage-light);
}

.founder-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.founder-text { flex: 1; }

/* ========== STEPS ========== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  max-width: 800px;
}

.step-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  text-align: left;
  box-shadow: 0 2px 12px rgba(61,50,41,0.06);
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.step-icon {
  width: 80px;
  height: 80px;
  min-width: 80px;
  color: var(--teal);
  flex-shrink: 0;
}

.step-card h3 { color: var(--teal); }

/* ========== SECTION HEADER ========== */
.section-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  margin-top: 0;
}

/* ========== HOW IT WORKS INTRO ========== */
.how-it-works-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.intro-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(61,50,41,0.06);
}

.intro-card.left-card {
  background: var(--rose);
  color: var(--white);
}

.intro-card.left-card h3 {
  font-size: 1.6rem;
  margin: 0 0 1.5rem 0;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.intro-card.left-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: var(--white);
}

.intro-card.right-card {
  background: var(--white);
  border-left: 4px solid var(--rose);
}

.intro-card.right-card p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  color: var(--text);
}

/* ========== HOW IT WORKS CARDS ========== */
.how-it-works-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.how-it-works-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(61,50,41,0.06);
}

.how-it-works-card:nth-child(odd) {
  flex-direction: row;
}

.how-it-works-card:nth-child(even) {
  flex-direction: row-reverse;
}

.phone-mockup {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  justify-content: center;
}

.phone-img {
  width: 180px;
  height: 280px;
  border-radius: 12px;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-content .card-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
}

.card-content .card-icon img {
  width: 100%;
  height: 100%;
}

.card-content h3 {
  color: var(--teal);
  font-size: 1.5rem;
  margin: 0;
}

.card-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.card-content p:last-child {
  margin-bottom: 0;
}

.how-it-works-banner {
  background: var(--white);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(61,50,41,0.06);
  margin-top: 2rem;
}

.how-it-works-banner p {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 2rem;
}

/* ========== TESTIMONIALS ========== */
.results-layout {
  display: flex;
  gap: 3rem;
}

.results-main { flex: 1; }

.testimonial-card {
  background: var(--white);
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(61,50,41,0.04);
}

.testimonial-card .name {
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.testimonial-card .quote {
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

/* Results Section Layouts */
.results-section-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

.results-row-narrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.results-row-large {
  margin-bottom: 2rem;
}

.testimonial-card-large {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(61,50,41,0.04);
}

.testimonial-card-large .image-placeholder {
  flex-shrink: 0;
  width: 280px;
  min-height: 280px;
}

.testimonial-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonial-text .name {
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.testimonial-text .quote {
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

.result-img {
  width: 100%;
  border-radius: 8px;
}

.results-row-square {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.testimonial-card-square {
  background: var(--white);
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(61,50,41,0.04);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonial-card-square .name {
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.testimonial-card-square .quote {
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Sidebar testimonials */
.testimonial-sidebar {
  position: sticky;
  top: 140px;
  width: 280px;
  min-width: 280px;
  max-height: calc(100vh - 160px);
  padding: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: var(--sand);
}

.sidebar-header {
  flex-shrink: 0;
  background: var(--white);
  z-index: 20;
  margin-bottom: 1.5rem;
}

.testimonial-sidebar > div:first-child {
  margin: 0;
  padding: 0;
}

.testimonial-sidebar .sidebar-label {
  background: var(--white);
  padding: 0.6rem 1rem;
  margin: 0 !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0 1rem 1rem 1rem;
  margin-top: 24px;
  background: var(--sand);
}

.sidebar-content .sidebar-testimonial {
  margin-bottom: 1rem;
}

.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-thumb { background: #d4cdc4; border-radius: 4px; }
.sidebar-content::-webkit-scrollbar-track { background: transparent; }

.sidebar-testimonial {
  background: var(--white);
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  width: 100%;
}

.sidebar-testimonial .name {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.sidebar-testimonial .quote {
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.sidebar-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

/* ========== MAIN + SIDEBAR LAYOUT ========== */
.with-sidebar {
  display: flex;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: flex-start;
}

.main-content { flex: 1; min-width: 0; }

/* ========== PRICING ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.pricing-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 2px 16px rgba(61,50,41,0.08);
  position: relative;
}

.pricing-card.featured {
  border: 3px solid var(--teal);
}

.pricing-card .badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--white);
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  margin: 1rem 0 0.3rem;
}

.pricing-card .price-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.pricing-features li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.pricing-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* ========== FAQ ========== */
.faq-item {
  border-bottom: 1px solid #e0dbd3;
  padding: 1.2rem 0;
}

.faq-question {
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--charcoal);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  padding: 0;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--teal);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: "\2212";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 0.8rem;
}

/* ========== SCIENCE PAGE ========== */
.science-toc {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 12px rgba(61,50,41,0.06);
}

.science-toc h2 { margin-top: 0; color: var(--teal); font-size: 1.2rem; }

.science-toc ul {
  list-style: none;
  columns: 2;
  gap: 1rem;
}

.science-toc li {
  padding: 0.3rem 0;
  font-size: 0.9rem;
}

.science-toc a {
  color: var(--teal);
  font-weight: 600;
}

.science-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e0dbd3;
}

.science-section:last-of-type { border-bottom: none; }

.disclaimer-box {
  background: var(--sage-light);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

.reference-list {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-light);
}

.reference-list a { color: var(--teal); }

/* ========== IMAGE PLACEHOLDERS ========== */
.image-placeholder {
  background: linear-gradient(135deg, var(--sage-light) 0%, var(--sand) 100%);
  border: 2px dashed #c0b8a8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

.image-placeholder.hero-img { min-height: 400px; margin-bottom: 2rem; }
.image-placeholder.section-img { min-height: 250px; margin: 2rem 0; }
.image-placeholder.portrait { width: 250px; min-height: 320px; }

/* ========== FOOTER ========== */
.footer {
  background: var(--charcoal);
  color: var(--sand);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-tagline {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-contact {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--sand);
}

.footer-contact a { color: var(--rose); }
.footer-contact a:hover { color: var(--white); }

.footer-legal {
  font-size: 0.8rem;
  color: #8a8279;
  margin-top: 1.5rem;
  line-height: 1.6;
}

/* ========== SAVVISOUND BRAND ========== */
.savvi-bold { font-weight: 800; }
.no-break { white-space: nowrap; }

/* ========== RESPONSIVE ========== */
/* Prevent horizontal scroll from full-width elements */
body { overflow-x: hidden; }

/* Large Tablets and Smaller Desktops — must come FIRST (largest breakpoint) */
@media (max-width: 1024px) {
  html { font-size: 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .navbar { min-height: 100px; }
  .navbar-links { display: none; }
  .hamburger { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 2rem 2rem;
    border-bottom: 1px solid #e0dbd3;
    box-shadow: 0 4px 12px rgba(61,50,41,0.1);
  }
  .navbar-links.open a {
    padding: 0.8rem 0;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .navbar-cta { display: none; }

  .page-wrapper { padding-top: 120px; }

  .with-sidebar { flex-direction: column; }
  .testimonial-sidebar {
    position: static;
    width: 100%;
    min-width: auto;
    max-height: none;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
  }
  .sidebar-header { display: none; }
  .sidebar-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0 1rem 0.5rem;
    margin-top: 0;
  }
  .sidebar-testimonial {
    min-width: 260px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .founder-layout { flex-direction: column; align-items: center; }
  .founder-photo { width: 200px; min-width: auto; }

  .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }

  .how-it-works-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .intro-card { padding: 2rem; }
  .intro-card.left-card h3 { font-size: 1.3rem; }

  .how-it-works-card {
    flex-direction: column !important;
    padding: 1.5rem;
  }

  .phone-mockup {
    width: 100%;
    margin-bottom: 1rem;
  }

  .phone-img {
    width: 100%;
    max-width: 200px;
    height: 300px;
  }

  .hero { min-height: auto; padding: 3rem 1.5rem 2.5rem; }
  .hero h1 { font-size: 2rem; }

  .section { padding: 3rem 1.5rem; }

  .science-toc ul { columns: 1; }

  .results-row-narrow {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-row-square {
    grid-template-columns: 1fr;
  }

  .testimonial-card-large {
    flex-direction: column;
  }

  .testimonial-card-large .image-placeholder {
    width: 100%;
  }

  /* Remove forced square on tablet — let content breathe */
  .testimonial-card-square {
    aspect-ratio: auto;
  }
}

/* Tablet and Medium Screens */
@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }

  .section { padding: 2.5rem 1.5rem; }

  .results-row-narrow {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .results-row-large {
    margin-bottom: 1.5rem;
  }

  .how-it-works-card {
    flex-direction: column !important;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .phone-mockup {
    width: 100%;
    margin: 0;
  }

  .phone-img {
    width: 100%;
    max-width: 150px;
    height: 250px;
  }

  .cta-button {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    width: auto;
    display: inline-block;
    white-space: normal;
  }

  .cta-center .cta-button {
    display: inline-block;
    margin: 0 auto;
  }
}

/* Phone Screens */
@media (max-width: 480px) {
  html { font-size: 14px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  p { margin-bottom: 1rem; }

  .navbar { min-height: 80px; padding: 0.75rem 1rem; }
  .navbar-logo img { height: 55px; }
  .page-wrapper { padding-top: 100px; }

  .hero h1 { font-size: 1.5rem; }
  .hero .subheading { font-size: 1rem; }
  .hero .patent-line { font-size: 0.85rem; }
  .section { padding: 2rem 1rem; }
  /* Round 2 of "how could it fail", 2026-10-07: the six code boxes need
     236.6 points on a 320-point phone (6 boxes of 33.6 and 5 gaps of 7);
     the wide section's 2rem sides, the card's 1.5rem padding, and its 2-point
     border left 218. With 1rem sides the card leaves 246. */
  .section-wide { padding: 2rem 1rem; }

  .cta-button {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    min-width: auto;
    white-space: normal;
    text-align: center;
  }

  .results-row-narrow {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .results-row-square {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonial-card {
    padding: 1.2rem 1rem;
    margin-bottom: 1rem;
  }

  .testimonial-card-large {
    flex-direction: column;
    padding: 1.2rem 1rem;
    gap: 1rem;
  }

  .testimonial-card-large .image-placeholder {
    width: 100%;
    min-height: 180px;
  }

  .testimonial-card-square {
    aspect-ratio: auto;
  }

  .how-it-works-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .intro-card { padding: 1.2rem; }
  .intro-card.left-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
  .intro-card.right-card p { font-size: 0.9rem; }

  .how-it-works-card {
    flex-direction: column !important;
    padding: 1.2rem;
    gap: 1rem;
  }

  .phone-img {
    width: 100%;
    max-width: 120px;
    height: 200px;
  }

  .card-content h3 { font-size: 1.2rem; }
  .card-content p { font-size: 0.85rem; }

  .how-it-works-banner { padding: 1.5rem 1rem; }
  .how-it-works-banner p { font-size: 1.1rem; }

  .testimonial-sidebar { padding: 0 1rem; }
  .sidebar-testimonial { min-width: 220px; }

  .disclaimer-box { padding: 1rem 1.2rem; font-size: 0.85rem; }

  .footer { padding: 2rem 1rem; }
  .footer-tagline { font-size: 1rem; }
}

/* Landscape phones — reduce navbar and hero height */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar { min-height: 60px; padding: 0.5rem 1rem; }
  .navbar-logo img { height: 45px; }
  .page-wrapper { padding-top: 80px; }
  .hero { min-height: auto; padding: 1.5rem 1.5rem 1rem; }
  .hero h1 { font-size: 1.4rem; }
}

/* L's direction 2026-10-06: the six-digit withdrawal code, one box per digit.
   A box lights teal as it fills and the box being typed in carries a ring. */
.code-boxes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0; }
.code-box {
  width: 3rem; height: 3.5rem; text-align: center; font-size: 1.5rem; font-weight: 700;
  border: 2px solid #d0d5cf; border-radius: 10px; background: #fff; color: #1a1a1a;
}
.code-box:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26, 122, 109, 0.25); }
.code-box.filled { border-color: var(--teal); background: #eef7f5; }
@media (max-width: 480px) {
  /* Round 3: 3.15rem at 14 points is 44 points, the touch minimum. */
  .code-box { width: 2.4rem; height: 3.15rem; font-size: 1.25rem; }
}
