:root {
  --ink: #14212d;
  --muted: #5d6873;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --navy: #17324d;
  --blue: #0d4f7c;
  --teal: #087f86;
  --amber: #d99a2b;
  --red: #b42318;
  --green: #4c7a55;
  --line: rgba(20, 33, 45, 0.14);
  --shadow: 0 18px 50px rgba(23, 50, 77, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(247, 245, 239, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 238px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.03rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, #ffffff 0 15%, transparent 16%),
    radial-gradient(circle at 50% 63%, var(--amber) 0 11%, transparent 12%),
    conic-gradient(from 35deg, var(--teal), var(--blue), var(--amber), var(--teal));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.86);
  flex: 0 0 auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.top-nav a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.top-nav a:hover {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 6px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #101f2e;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(16, 31, 46, 0.93) 0%, rgba(16, 31, 46, 0.8) 35%, rgba(16, 31, 46, 0.18) 75%),
    url("assets/images/reflux-surgery-hero.png");
  background-size: cover;
  background-position: center right;
}

.hero-copy {
  position: relative;
  width: min(820px, 100%);
  padding: clamp(70px, 10vw, 132px) clamp(20px, 6vw, 72px) clamp(34px, 7vw, 82px);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero .eyebrow,
.decision-section .eyebrow {
  color: #9ee3df;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 780px;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: 1.2rem;
}

.lede {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
}

.hero-actions,
.finder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--amber);
  color: #1e1608;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.finder-tool .button.secondary {
  background: var(--navy);
  border-color: var(--navy);
}

.safety-strip {
  max-width: 760px;
  margin-top: 26px;
  padding: 14px 16px;
  border-left: 5px solid var(--red);
  background: rgba(180, 35, 24, 0.2);
  color: #fff2ef;
}

.quick-grid,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  transform: translateY(-24px);
  background: var(--line);
  box-shadow: var(--shadow);
}

.quick-grid article {
  background: var(--panel);
  padding: 24px;
}

.quick-grid span {
  color: var(--amber);
  font-weight: 900;
}

.quick-grid h2 {
  margin: 10px 0;
  font-size: 1.15rem;
}

.quick-grid p,
.panel p,
.option-list p,
.diagnosis-grid p,
.note-card p,
.tech-grid p,
.medicine-grid p,
.bariatric-grid p,
.wrap-card p {
  color: var(--muted);
}

.section {
  padding: 70px 0;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.two-col,
.diagnosis-grid,
.anatomy-grid,
.option-list,
.tech-grid,
.medicine-grid,
.bariatric-grid,
.wrap-visuals,
.decision-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnosis-grid,
.anatomy-grid,
.option-list,
.tech-grid,
.medicine-grid,
.bariatric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wrap-visuals,
.decision-grid,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.diagnosis-grid article,
.option-list article,
.tech-grid article,
.medicine-grid article,
.wrap-card,
.decision-grid article,
.stats-grid article,
.note-card,
.finder-tool,
.directory-panel,
.anatomy-grid figure,
.animated-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.panel.dark {
  background: var(--navy);
  color: #ffffff;
}

.panel.dark p {
  color: rgba(255, 255, 255, 0.78);
}

.check-list {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.check-list li:last-child {
  border-bottom: 0;
}

.symptom-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.symptom-feature img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e2b46;
}

.symptom-feature p {
  color: var(--muted);
}

.cardiac-warning {
  padding: 14px 16px;
  color: #6f1d16 !important;
  background: #fff3ef;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  font-weight: 700;
}

.anatomy-grid figure {
  margin: 0;
  padding: 12px;
}

.anatomy-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0e2b46;
}

.anatomy-grid figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.animated-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
}

.reflux-animation svg {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.acid-stream {
  stroke-dasharray: 70 230;
  animation: refluxFlow 2.2s linear infinite;
}

.acid-stream.delay {
  animation-delay: 0.6s;
}

.bubble {
  animation: bubbleRise 2s ease-in-out infinite;
}

.b2 {
  animation-delay: 0.4s;
}

.b3 {
  animation-delay: 0.8s;
}

@keyframes refluxFlow {
  from {
    stroke-dashoffset: 250;
  }
  to {
    stroke-dashoffset: -80;
  }
}

@keyframes bubbleRise {
  0% {
    transform: translateY(18px);
    opacity: 0;
  }
  30%,
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-55px);
    opacity: 0;
  }
}

.split-band,
.finder-section,
.warning-section,
.lifestyle-section {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
}

.split-band {
  background: #eaf4f3;
}

.warning-section {
  background: #fff3ef;
}

.lifestyle-section {
  background: #edf4ee;
}

.stats-grid article {
  background: #ffffff;
}

.stats-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.medicine-grid .wide {
  grid-column: span 4;
  border-left: 5px solid var(--amber);
}

.wrap-card {
  padding: 18px;
}

.wrap-card svg {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.wrap-taxonomy {
  margin-top: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.wrap-taxonomy p {
  max-width: 980px;
  color: var(--muted);
}

.wrap-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.wrap-table div {
  padding: 14px;
  background: #f3f8f8;
  border: 1px solid rgba(8, 127, 134, 0.18);
  border-radius: 6px;
}

.wrap-table strong,
.wrap-table span {
  display: block;
}

.wrap-table span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.94rem;
}

.technique-panel {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.technique-panel p {
  color: var(--muted);
}

.technique-panel svg {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.surgery-options {
  margin-top: 18px;
}

.surgery-figure {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) 1fr;
  gap: 18px;
  align-items: center;
  margin: 18px 0 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.06);
}

.surgery-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.surgery-figure figcaption {
  color: var(--muted);
  font-size: 1.02rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline div {
  padding: 22px;
  background: var(--panel);
}

.timeline span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--green);
  font-weight: 900;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.decision-section {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #152738;
  color: #ffffff;
}

.decision-section .section-heading p:not(.eyebrow),
.decision-grid p {
  color: rgba(255, 255, 255, 0.76);
}

.decision-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.decision-grid article:nth-child(4) {
  border-color: rgba(255, 149, 135, 0.45);
  background: rgba(180, 35, 24, 0.18);
}

.anesthesia-note {
  margin-top: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 5px solid #f1b64f;
  border-radius: 8px;
}

.anesthesia-note p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.anesthesia-note a {
  color: #ffe2a6;
  font-weight: 900;
}

.story-section {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #f4efe5;
}

.finder-section {
  background: #f0eee7;
}

.procedure-pages {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #ffffff;
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.procedure-grid a {
  display: block;
  padding: 18px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(23, 50, 77, 0.05);
}

.procedure-grid strong,
.procedure-grid span {
  display: block;
}

.procedure-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 500;
}

.finder-tool label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.finder-row input {
  flex: 1 1 280px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.finder-caution {
  margin: 14px 0 0;
  padding: 14px 16px;
  color: #65320f;
  background: #fff3db;
  border: 1px solid rgba(217, 154, 43, 0.45);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  font-weight: 650;
}

.finder-buttons,
.language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.language-tabs {
  margin: 0 0 14px;
}

.finder-buttons button,
.language-tabs button {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.finder-buttons button.active,
.language-tabs button.active {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
}

.finder-links,
.directory-links,
.reference-grid,
.language-panel {
  display: grid;
  gap: 10px;
}

.finder-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.finder-links-top {
  margin-top: 12px;
  margin-bottom: 14px;
}

.directory-panel {
  margin-top: 16px;
}

.directory-links {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-grid,
.language-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finder-links a,
.directory-links a,
.reference-grid a,
.language-panel div {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
}

.finder-links a:first-child {
  background: #1267d8;
  border-color: #1267d8;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 103, 216, 0.25);
}

.language-panel strong,
.language-panel span {
  display: block;
}

.language-panel span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 500;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px clamp(18px, 4vw, 54px);
  background: var(--navy);
  color: #ffffff;
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.anonamed {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.anonamed img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
}

.story-hero {
  min-height: 62vh;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(16, 31, 46, 0.92), rgba(16, 31, 46, 0.45)),
    url("assets/images/reflux-surgery-hero.png");
  background-size: cover;
  background-position: center right;
  color: #ffffff;
}

.story-hero-copy {
  width: min(820px, 100%);
  padding: clamp(70px, 10vw, 120px) clamp(20px, 6vw, 72px) clamp(34px, 7vw, 72px);
}

.story-hero-copy .eyebrow {
  color: #9ee3df;
}

@media (max-width: 980px) {
  .quick-grid,
  .diagnosis-grid,
  .anatomy-grid,
  .option-list,
  .tech-grid,
  .medicine-grid,
  .bariatric-grid,
  .wrap-visuals,
  .decision-grid,
  .stats-grid,
  .timeline,
  .procedure-grid,
  .directory-links,
  .reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .medicine-grid .wide {
    grid-column: span 2;
  }

  .finder-links,
  .language-panel,
  .animated-panel,
  .technique-panel,
  .wrap-table,
  .symptom-feature,
  .surgery-figure {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .top-nav:not(.story-nav) {
    display: none;
    position: absolute;
    inset: 65px 18px auto;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .top-nav.open {
    display: grid;
  }

  .story-nav {
    display: flex;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .quick-grid,
  .diagnosis-grid,
  .anatomy-grid,
  .option-list,
  .tech-grid,
  .medicine-grid,
  .bariatric-grid,
  .wrap-visuals,
  .decision-grid,
  .stats-grid,
  .timeline,
  .procedure-grid,
  .directory-links,
  .reference-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .medicine-grid .wide {
    grid-column: auto;
  }

  .site-header {
    padding-inline: 16px;
  }

  .brand {
    min-width: 0;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .hero {
    min-height: 92vh;
  }

  .hero-image {
    background-image:
      linear-gradient(180deg, rgba(16, 31, 46, 0.78) 0%, rgba(16, 31, 46, 0.72) 46%, rgba(16, 31, 46, 0.92) 100%),
      url("assets/images/reflux-chest-pain.png");
    background-position: center center;
  }

  .hero-copy {
    padding-top: 46vh;
    padding-bottom: 28px;
  }

  .hero .lede {
    font-size: 1rem;
  }

  .symptom-feature img {
    max-height: 520px;
    object-position: center;
  }

  .site-footer {
    display: grid;
  }
}
