/* ============================================
   AQUACANVAS — Master Stylesheet
   An aquarist's expert journal
   ============================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,400;1,9..144,500&family=Inter+Tight:wght@300;400;500;600;700&display=swap');

/* ---- Reset ---- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

a { color: inherit; text-decoration: none; }

button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

input, select, textarea { font: inherit; color: inherit; }

/* ---- Theme Variables ---- */
:root {
  --deep: #15397B;       /* primary deep ocean */
  --tide: #1F4489;       /* secondary brand */
  --amber: #FF9016;      /* sparing accent */
  --paper: #FAF8F3;      /* warm off-white */
  --ink: #0B1F44;        /* near-black navy */
  --mist: #E8EEF7;       /* pale wash */
  --silver: #C9D2E2;     /* divider */
  --foam: #FFFFFF;
  --shadow-soft: 0 8px 32px rgba(21, 57, 123, 0.08);
  --shadow-deep: 0 20px 60px rgba(11, 31, 68, 0.18);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter Tight', -apple-system, system-ui, sans-serif;
  --container: 1240px;
  --rad: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- Base ---- */
body {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--deep);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* ---- Reusable bits ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tide);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--deep);
  color: var(--foam);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
  border: 1px solid var(--deep);
}
.btn:hover {
  background: var(--tide);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(21, 57, 123, 0.25);
}
.btn--ghost {
  background: transparent;
  color: var(--deep);
  border: 1px solid var(--silver);
}
.btn--ghost:hover {
  background: var(--deep);
  color: var(--foam);
  border-color: var(--deep);
}
.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.btn--amber:hover {
  background: #ffa53d;
  border-color: #ffa53d;
  color: var(--ink);
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(21, 57, 123, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: var(--deep);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 144, 22, 0.5);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand small {
  display: block;
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--tide);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width .35s var(--ease);
}
.nav-list a:hover { color: var(--deep); }
.nav-list a:hover::after,
.nav-list a.active::after { width: 100%; }
.nav-list a.active { color: var(--deep); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--deep);
  color: var(--foam);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile nav handled in the comprehensive responsive overhaul below */

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 90px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(31, 68, 137, 0.10), transparent 70%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(255, 144, 22, 0.07), transparent 60%);
  pointer-events: none;
}
.hero-bg svg {
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  opacity: 0.18;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: center;
  position: relative;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 60px 0 50px; }
}
.hero h1 {
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--tide);
}
.hero-lede {
  font-size: 1.15rem;
  color: rgba(11, 31, 68, 0.78);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  gap: 36px;
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--silver);
  flex-wrap: wrap;
}
.hero-meta div { min-width: 110px; }
.hero-meta strong {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--deep);
  line-height: 1;
}
.hero-meta span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tide);
  margin-top: 6px;
  display: block;
}

/* Hero illustration */
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 480px;
  margin-left: auto;
}
.hero-art svg { width: 100%; height: 100%; }

/* ============================================
   CALCULATOR
   ============================================ */
.calc-section {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%);
  position: relative;
}
.calc-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--silver), transparent);
}
.calc-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}
.calc-header h2 { margin-bottom: 18px; }
.calc-header p { color: rgba(11, 31, 68, 0.72); font-size: 1.05rem; }

.calculator {
  background: var(--foam);
  border-radius: var(--rad);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto;
  border: 1px solid rgba(21, 57, 123, 0.08);
}
.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 580px;
}
@media (max-width: 880px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* Left panel — inputs */
.calc-input-pane {
  padding: 44px 44px 36px;
}
@media (max-width: 600px) {
  .calc-input-pane { padding: 32px 24px 28px; }
}

.shape-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--mist);
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 32px;
}
.shape-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tide);
  transition: all .3s var(--ease);
}
.shape-tab svg { width: 22px; height: 22px; transition: transform .35s var(--ease); }
.shape-tab.active {
  background: var(--deep);
  color: var(--foam);
  box-shadow: 0 6px 18px rgba(21, 57, 123, 0.25);
}
.shape-tab.active svg { transform: scale(1.05); }
.shape-tab:hover:not(.active) { background: rgba(255,255,255,0.6); }

.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--silver);
}
.unit-row label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide);
  font-weight: 500;
}
.unit-pills {
  display: flex;
  gap: 6px;
  background: var(--mist);
  padding: 4px;
  border-radius: 999px;
}
.unit-pill {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 999px;
  color: var(--tide);
  transition: all .25s var(--ease);
}
.unit-pill.active {
  background: var(--foam);
  color: var(--deep);
  box-shadow: 0 2px 6px rgba(21, 57, 123, 0.12);
}

.input-group { margin-bottom: 18px; position: relative; }
.input-group label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.input-group label .unit-tag {
  font-size: 0.72rem;
  color: var(--tide);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.input-wrap {
  position: relative;
}
.input-wrap input {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--silver);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .25s var(--ease), background .25s var(--ease);
  -moz-appearance: textfield;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.input-wrap input:focus {
  outline: none;
  border-color: var(--deep);
  background: var(--foam);
  box-shadow: 0 0 0 4px rgba(21, 57, 123, 0.08);
}
.helper-tip {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--tide);
  display: flex;
  align-items: center;
  gap: 6px;
}
.helper-tip svg { width: 14px; height: 14px; flex-shrink: 0; }

.glass-input {
  margin-top: 24px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 144, 22, 0.08), rgba(255, 144, 22, 0.02));
  border-radius: 10px;
  border: 1px dashed rgba(255, 144, 22, 0.4);
}
.glass-input label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.glass-input label .unit-tag {
  font-size: 0.7rem;
  color: var(--tide);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.glass-input input {
  width: 100%;
  padding: 10px 12px;
  background: var(--foam);
  border: 1px solid rgba(255, 144, 22, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
}

.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.btn-calc {
  flex: 1;
  padding: 16px 24px;
  background: var(--deep);
  color: var(--foam);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all .3s var(--ease);
}
.btn-calc:hover { background: var(--tide); transform: translateY(-1px); }
.btn-reset {
  padding: 16px 20px;
  border: 1.5px solid var(--silver);
  border-radius: 10px;
  color: var(--tide);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all .25s var(--ease);
}
.btn-reset:hover { border-color: var(--deep); color: var(--deep); }

/* Right panel — results */
.calc-result-pane {
  background: linear-gradient(155deg, var(--deep) 0%, var(--tide) 60%, #2A56A0 100%);
  color: var(--foam);
  padding: 44px 44px 36px;
  position: relative;
  overflow: hidden;
}
.calc-result-pane::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 144, 22, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.calc-result-pane::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C200,80 400,0 600,40 C800,80 1000,0 1200,40 L1200,80 L0,80 Z' fill='rgba(255,255,255,0.04)'/%3E%3Cpath d='M0,50 C200,90 400,10 600,50 C800,90 1000,10 1200,50 L1200,80 L0,80 Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") repeat-x;
  pointer-events: none;
}
.result-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  position: relative;
}
.result-title {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--foam);
  margin-bottom: 28px;
  position: relative;
}
.primary-result {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.primary-value {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 4.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.primary-value .unit {
  font-size: 0.32em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 8px;
  letter-spacing: 0.05em;
}
.primary-sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.result-list {
  list-style: none;
  position: relative;
  display: grid;
  gap: 14px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
}
.result-row .label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}
.result-row .value {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--foam);
}
.result-row .value .unit {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 5px;
  font-family: var(--body);
  font-weight: 500;
}

.stocking-note {
  margin-top: 22px;
  padding: 14px 16px;
  background: rgba(255, 144, 22, 0.14);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
}
.stocking-note strong { color: var(--amber); display: block; margin-bottom: 2px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }

.export-row {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  position: relative;
}
.export-btn {
  flex: 1;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--foam);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background .25s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.export-btn:hover { background: rgba(255, 255, 255, 0.18); }
.export-btn svg { width: 14px; height: 14px; }

.result-empty {
  display: grid;
  place-items: center;
  text-align: center;
  height: 100%;
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px;
}
.result-empty svg { width: 64px; height: 64px; opacity: 0.4; margin-bottom: 18px; }

/* ============================================
   FEATURES / SECTIONS
   ============================================ */
.section { padding: 100px 0; }
.section-narrow { max-width: 880px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: rgba(11, 31, 68, 0.72); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }

@media (max-width: 700px) { .section { padding: 70px 0; } }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.feat-card {
  padding: 30px 26px;
  background: var(--foam);
  border: 1px solid var(--silver);
  border-radius: var(--rad);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--amber);
  transition: width .5s var(--ease);
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(21, 57, 123, 0.2);
}
.feat-card:hover::before { width: 100%; }
.feat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mist), var(--paper));
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--deep);
}
.feat-icon svg { width: 24px; height: 24px; }
.feat-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feat-card p { font-size: 0.92rem; color: rgba(11, 31, 68, 0.72); margin-bottom: 0; }

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--silver);
  border-radius: var(--rad);
  background: var(--foam);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.faq-item[open] { border-color: rgba(21, 57, 123, 0.25); box-shadow: var(--shadow-soft); }
.faq-summary {
  padding: 22px 26px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--deep);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "";
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: var(--mist);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315397B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  transition: transform .35s var(--ease);
}
.faq-item[open] .faq-summary::after { transform: rotate(180deg); }
.faq-body {
  padding: 0 26px 24px;
  color: rgba(11, 31, 68, 0.78);
  font-size: 0.97rem;
}
.faq-body p { margin-bottom: 0.85em; }
.faq-body p:last-child { margin-bottom: 0; }

/* ============================================
   AUTHOR / EXPERT BAND
   ============================================ */
.expert-band {
  background: var(--ink);
  color: var(--foam);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.expert-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 144, 22, 0.10), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(31, 68, 137, 0.4), transparent 60%);
  pointer-events: none;
}
.expert-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
@media (max-width: 700px) { .expert-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; } }
.expert-portrait {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tide), var(--deep));
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(255, 144, 22, 0.3);
}
.expert-portrait svg { width: 60%; height: 60%; }
.expert-portrait::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 144, 22, 0.3);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.expert-band h2 { color: var(--foam); }
.expert-band h2 em { color: var(--amber); font-style: italic; font-weight: 500; }
.expert-band p { color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; max-width: 580px; }
.expert-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  justify-content: flex-start;
}
@media (max-width: 700px) { .expert-tags { justify-content: center; } }
.expert-tag {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 28px;
}
.blog-card {
  background: var(--foam);
  border: 1px solid var(--silver);
  border-radius: var(--rad);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.blog-card-img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--deep), var(--tide));
  position: relative;
  overflow: hidden;
}
.blog-card-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.blog-card-body { padding: 26px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tide);
}
.blog-card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.blog-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  line-height: 1.25;
}
.blog-card-body p { color: rgba(11, 31, 68, 0.72); font-size: 0.93rem; margin-bottom: 18px; flex-grow: 1; }
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--deep);
  letter-spacing: 0.04em;
  align-self: flex-start;
}
.blog-card-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.blog-card:hover .blog-card-link svg { transform: translateX(4px); }

/* ============================================
   ARTICLE / BLOG POST
   ============================================ */
.article-hero {
  padding: 70px 0 50px;
  background: linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--silver);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tide);
  flex-wrap: wrap;
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.article-hero h1 { max-width: 880px; margin-bottom: 22px; }
.article-hero p.lede {
  max-width: 720px;
  font-size: 1.18rem;
  color: rgba(11, 31, 68, 0.78);
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
}

.article {
  padding: 60px 0 90px;
}
.article-body {
  max-width: 740px;
  margin: 0 auto;
  font-size: 1.07rem;
  line-height: 1.78;
  color: rgba(11, 31, 68, 0.88);
}
.article-body h2 {
  font-size: 1.85rem;
  margin: 48px 0 18px;
  color: var(--deep);
}
.article-body h3 {
  font-size: 1.35rem;
  margin: 36px 0 14px;
  color: var(--deep);
}
.article-body p { margin-bottom: 1.2em; }
.article-body ul, .article-body ol {
  margin: 0 0 1.5em 1.4em;
}
.article-body li { margin-bottom: 0.55em; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-family: var(--display); font-style: italic; }
.article-body a { color: var(--deep); border-bottom: 1px solid var(--amber); transition: background .25s var(--ease); }
.article-body a:hover { background: rgba(255, 144, 22, 0.15); }
.article-body blockquote {
  margin: 32px 0;
  padding: 24px 30px;
  background: var(--mist);
  border-left: 3px solid var(--amber);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--deep);
  border-radius: 0 8px 8px 0;
}
.article-body .callout {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--foam);
  border: 1px solid var(--silver);
  border-radius: 12px;
  position: relative;
}
.article-body .callout::before {
  content: "Editor's note";
  display: block;
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.article-body .callout p:last-child { margin-bottom: 0; }
.article-body .callout p { font-size: 0.97rem; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.95rem;
}
.article-body th, .article-body td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--silver);
}
.article-body th {
  background: var(--mist);
  color: var(--deep);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.article-share {
  max-width: 740px;
  margin: 50px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--silver);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.article-share .label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide);
  font-weight: 500;
}
.article-share-btns { display: flex; gap: 8px; }
.share-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--mist);
  display: grid;
  place-items: center;
  color: var(--deep);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.share-btn:hover { background: var(--deep); color: var(--foam); }
.share-btn svg { width: 16px; height: 16px; }

/* ============================================
   GENERIC PAGE (About / Contact / Policy)
   ============================================ */
.page-hero {
  padding: 80px 0 50px;
  background: linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--silver);
  text-align: center;
}
.page-hero h1 { margin-bottom: 18px; }
.page-hero p { max-width: 620px; margin: 0 auto; color: rgba(11, 31, 68, 0.72); font-size: 1.05rem; }

.policy-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
}
.policy-body h2 { font-size: 1.6rem; margin: 40px 0 14px; color: var(--deep); }
.policy-body h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--deep); }
.policy-body p { margin-bottom: 1em; color: rgba(11, 31, 68, 0.82); }
.policy-body ul { margin: 0 0 1.2em 1.4em; }
.policy-body li { margin-bottom: 0.5em; color: rgba(11, 31, 68, 0.82); }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
.contact-info h3 { margin-bottom: 18px; }
.contact-info p { color: rgba(11, 31, 68, 0.78); margin-bottom: 22px; }
.contact-detail-list { list-style: none; }
.contact-detail-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--silver);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-detail-list svg {
  width: 22px; height: 22px;
  color: var(--deep);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-detail-list .label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide);
  margin-bottom: 4px;
}
.contact-detail-list .value { color: var(--ink); font-weight: 500; }

.contact-form {
  background: var(--foam);
  padding: 36px;
  border-radius: var(--rad);
  border: 1px solid var(--silver);
  box-shadow: var(--shadow-soft);
}
@media (max-width: 600px) { .contact-form { padding: 26px; } }
.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--paper);
  border: 1.5px solid var(--silver);
  border-radius: 8px;
  font-size: 0.97rem;
  color: var(--ink);
  transition: border-color .25s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--deep);
  background: var(--foam);
}
.form-success {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(31, 68, 137, 0.08);
  border-left: 3px solid var(--deep);
  border-radius: 4px;
  color: var(--deep);
  font-size: 0.92rem;
  font-weight: 500;
  display: none;
}
.form-success.show { display: block; animation: fadeIn .4s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 70px 0 30px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 144, 22, 0.5), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.footer-col h4 {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col .brand { color: var(--foam); margin-bottom: 16px; }
.footer-col .brand-mark { background: var(--tide); }
.footer-col p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.65); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  transition: color .25s var(--ease);
  position: relative;
}
.footer-links a:hover { color: var(--amber); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .credit em { color: rgba(255, 255, 255, 0.7); font-style: italic; font-family: var(--display); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  transition: background .25s var(--ease);
}
.footer-socials a:hover { background: var(--amber); color: var(--ink); }
.footer-socials svg { width: 14px; height: 14px; }

/* ============================================
   ANIMATIONS / UTILITIES
   ============================================ */
/* Fade-up reveal — content is ALWAYS visible.
   The animation is a progressive enhancement only. If JS doesn't run
   or IntersectionObserver fails, content shows normally without animation.
   This prevents the blank-page issue when scripts fail to load. */
.fade-up {
  opacity: 1;
  transform: none;
  transition: none;
}
/* Only apply the animation if the browser supports JS-driven reveal AND
   the document body has the .anim-ready flag added by main.js */
.anim-ready .fade-up:not(.in) {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.anim-ready .fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

.tank-water {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(180deg, rgba(31, 68, 137, 0.4), rgba(21, 57, 123, 0.6));
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  transition: height 1.4s var(--ease);
  border-radius: 0 0 8px 8px;
}

/* ============================================
   CTA / FINAL BAND
   ============================================ */
.cta-band {
  padding: 90px 0;
  background: var(--deep);
  color: var(--foam);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 144, 22, 0.12), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { color: var(--foam); margin-bottom: 18px; max-width: 760px; margin-left: auto; margin-right: auto; }
.cta-band h2 em { font-style: italic; color: var(--amber); }
.cta-band p { color: rgba(255, 255, 255, 0.78); max-width: 580px; margin: 0 auto 32px; font-size: 1.05rem; }
.cta-band .btn {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.cta-band .btn:hover { background: #ffa53d; border-color: #ffa53d; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   FEEDING CALCULATOR
   ============================================ */
.feeding-calculator {
  background: var(--paper);
  border: 1px solid var(--silver);
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(11, 31, 68, 0.18);
  position: relative;
}

.fc-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 540px;
}

.fc-input-pane {
  padding: 44px 40px;
  background: var(--paper);
}

.fc-result-pane {
  padding: 44px 40px;
  background: linear-gradient(135deg, var(--deep) 0%, var(--tide) 50%, #0B1F44 100%);
  color: var(--foam);
  position: relative;
  overflow: hidden;
}

.fc-result-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 144, 22, 0.08), transparent 50%);
  pointer-events: none;
}

.fc-section-title {
  font-family: var(--display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tide);
  margin-bottom: 18px;
  font-weight: 600;
}

.fc-field {
  margin-bottom: 20px;
}

.fc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.fc-field select,
.fc-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--silver);
  border-radius: 8px;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.fc-field select:focus,
.fc-field input:focus {
  outline: none;
  border-color: var(--tide);
  box-shadow: 0 0 0 4px rgba(31, 68, 137, 0.1);
}

.fc-stage-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fc-species-hint {
  display: none;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--tide);
  font-weight: 500;
  background: var(--mist);
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: capitalize;
}

.fc-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.fc-actions .btn-calc,
.fc-actions .btn-reset {
  flex: 1;
}

/* Empty state */
.fc-result-empty {
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 1;
}

.fc-result-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  opacity: 0.5;
}

.fc-result-empty p {
  max-width: 280px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* Filled state */
.fc-result-filled {
  position: relative;
  z-index: 1;
}

.fc-result-eyebrow {
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}

.fc-result-species {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--foam);
  font-weight: 500;
}

.fc-result-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  font-size: 0.74rem;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.fc-schedule-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.fc-schedule-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.fc-schedule-headline-label {
  font-family: var(--display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
}

.fc-schedule-times {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--amber);
  font-weight: 500;
  line-height: 1;
}

.fc-schedule-times .unit {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 6px;
}

.fc-clock {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.fc-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(255, 144, 22, 0.16);
  border: 1px solid rgba(255, 144, 22, 0.28);
  border-radius: 14px;
  font-size: 0.78rem;
  color: var(--amber);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fc-time-pill svg {
  width: 13px;
  height: 13px;
}

.fc-schedule-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.78);
}

.fc-schedule-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.fc-schedule-detail-row .label { color: rgba(255, 255, 255, 0.55); }
.fc-schedule-detail-row .value { color: var(--foam); font-weight: 500; text-align: right; }

.fc-foods {
  margin-bottom: 14px;
}

.fc-foods-title {
  font-family: var(--display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.fc-foods ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fc-foods li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}

.fc-foods li:last-child { border-bottom: none; }

.fc-food-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 144, 22, 0.18);
  color: var(--amber);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.fc-avoid {
  background: rgba(220, 80, 80, 0.1);
  border: 1px solid rgba(220, 80, 80, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.fc-avoid-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ff9da0;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fc-avoid ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.fc-avoid li {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 3px 0;
}

.fc-multiplier {
  display: none;
  background: rgba(255, 144, 22, 0.1);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.fc-fasting {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.85);
}

.fc-fasting svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--amber);
  margin-top: 1px;
}

.fc-notes {
  font-size: 0.83rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
  margin-bottom: 18px;
}

.fc-export-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fc-export-row .export-btn {
  flex: 1;
  min-width: 80px;
}


/* ============================================
   COMPREHENSIVE RESPONSIVE BREAKPOINTS
   Target: 100% mobile-friendly across iPhone/Android,
   tablet portrait, tablet landscape, desktop.
   ============================================ */

/* ---------- Large desktop adjustments (>1200px keeps base styles) ---------- */

/* ---------- Medium desktop / small laptop (max 1100px) ---------- */
@media (max-width: 1100px) {
  .container { padding: 0 30px; }
  h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
  .hero { padding: 90px 0 70px; }
  .hero-grid { gap: 40px; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .fc-grid { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
}

/* ---------- Tablet (max 900px) — major layout shifts ---------- */
@media (max-width: 900px) {
  /* Header / nav becomes mobile menu */
  .nav-toggle { display: flex; }
/* (Removed earlier mobile nav rules — see consolidated block at end of file) */

  /* Hero stacks */
  .hero { padding: 70px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 460px; margin: 0 auto; }
  .hero-meta { gap: 30px; }

  /* Calculators stack */
  .calc-grid { grid-template-columns: 1fr; min-height: auto; }
  .calc-input-pane,
  .calc-result-pane { padding: 36px 28px; }

  .fc-grid { grid-template-columns: 1fr; min-height: auto; }
  .fc-input-pane,
  .fc-result-pane { padding: 36px 28px; }

  /* Sections */
  .section { padding: 70px 0; }

  /* Expert band stacks */
  .expert-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .expert-portrait { max-width: 200px; margin: 0 auto; }
  .expert-tags { justify-content: center; }

  /* Contact form stacks */
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  /* Footer condenses */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .footer-col:first-child { grid-column: 1 / -1; }

  /* CTA */
  .cta-band { padding: 70px 0; }
}

/* ---------- Tablet portrait / large phone (max 700px) ---------- */
@media (max-width: 700px) {
  /* Tighter container */
  .container { padding: 0 22px; }

  /* Header */
  .site-header { height: 64px; }
  .header-inner { padding: 0 22px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand small { font-size: 0.65rem; }

  /* Typography scaling */
  h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); line-height: 1.12; }
  h2 { font-size: clamp(1.4rem, 5.5vw, 2rem); line-height: 1.18; }
  h3 { font-size: 1.15rem; }

  /* Hero */
  .hero { padding: 50px 0 40px; }
  .hero .eyebrow { margin-bottom: 14px; }
  .hero-lede { font-size: 0.96rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding-top: 24px;
    margin-top: 28px;
  }
  .hero-meta div { padding: 0 6px; border-right: 1px solid var(--silver); }
  .hero-meta div:last-child { border-right: none; }
  .hero-meta strong { font-size: 1.4rem; }
  .hero-meta span { font-size: 0.7rem; letter-spacing: 1px; }

  /* Calculator panes */
  .calc-input-pane,
  .calc-result-pane,
  .fc-input-pane,
  .fc-result-pane { padding: 28px 22px; }

  /* Shape tabs become compact */
  .shape-tabs { flex-wrap: wrap; gap: 6px; padding: 4px; }
  .shape-tab {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 0;
    padding: 10px 4px;
    font-size: 0.74rem;
    flex-direction: column;
    gap: 4px;
  }
  .shape-tab svg { width: 18px; height: 18px; }

  /* Unit pills */
  .unit-pills { flex-wrap: wrap; }

  /* Calculator inputs spacing */
  .input-group { margin-bottom: 16px; }
  .input-wrap input { padding: 12px 14px; font-size: 0.95rem; }

  /* Action buttons stack */
  .calc-actions,
  .fc-actions {
    flex-direction: column;
    gap: 10px;
  }
  .btn-calc, .btn-reset {
    width: 100%;
    padding: 14px;
  }

  /* Result primary value */
  .primary-value {
    font-size: 2.6rem;
    line-height: 1.05;
  }
  .result-title { font-size: 1rem; }

  /* Result list */
  .result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0;
  }
  .result-row .value { font-size: 1.15rem; }

  /* Export buttons stay in row but can wrap */
  .export-row, .fc-export-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .export-btn {
    flex: 1 1 calc(33.33% - 4px);
    min-width: 80px;
    padding: 9px 8px;
    font-size: 0.78rem;
  }

  /* Feeding calc — schedule headline stacks better */
  .fc-schedule-headline { gap: 6px; }
  .fc-schedule-times { font-size: 1.5rem; }
  .fc-stage-row { grid-template-columns: 1fr; gap: 14px; }

  /* Features grid */
  .feat-grid { grid-template-columns: 1fr; gap: 18px; }
  .feat-card { padding: 26px 22px; }

  /* Blog cards */
  .blog-grid { grid-template-columns: 1fr; gap: 22px; }
  .blog-card-body { padding: 22px; }
  .blog-card-body h3 { font-size: 1.2rem; }

  /* FAQ items */
  .faq-summary { font-size: 1rem; padding: 18px 22px; }
  .faq-item[open] .faq-body { padding: 0 22px 18px; }

  /* Section headings */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }

  /* Page hero (legal/about/contact) */
  .page-hero { padding: 80px 0 50px; }
  .page-hero h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }

  /* Article hero */
  .article-hero { padding: 90px 0 50px; }
  .article-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .article-hero .lede { font-size: 1.05rem; }
  .article-meta { font-size: 0.78rem; flex-wrap: wrap; gap: 10px; }
  .article-meta .dot { display: none; }

  /* Article body */
  .article-body { font-size: 1rem; }
  .article-body h2 { font-size: 1.4rem; margin-top: 40px; }
  .article-body h3 { font-size: 1.15rem; margin-top: 28px; }
  .article-body table { font-size: 0.85rem; }
  .article-body th, .article-body td { padding: 10px 8px; }
  .article-body blockquote { padding: 14px 18px; font-size: 0.98rem; }
  .callout { padding: 18px 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 30px; }
  .footer-col:first-child { grid-column: auto; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    font-size: 0.82rem;
  }

  /* CTA */
  .cta-band { padding: 56px 0; }
  .cta-band p { font-size: 0.96rem; }

  /* Contact info / form */
  .contact-info, .contact-form { padding: 28px 22px; }

  /* Policy body */
  .policy-body { font-size: 0.96rem; }
  .policy-body h2 { font-size: 1.35rem; margin-top: 36px; }
}

/* ---------- Small phone (max 480px) ---------- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 0 18px; }
  .brand small { display: none; }

  /* Even smaller hero */
  .hero { padding: 40px 0 32px; }
  h1 { font-size: clamp(1.55rem, 8vw, 2.2rem); }
  .hero-lede { font-size: 0.92rem; line-height: 1.55; }
  .hero-meta { gap: 0; padding-top: 20px; margin-top: 24px; }
  .hero-meta strong { font-size: 1.15rem; }
  .hero-meta span { font-size: 0.62rem; }

  /* Calculator becomes very compact */
  .calc-input-pane,
  .calc-result-pane,
  .fc-input-pane,
  .fc-result-pane { padding: 24px 18px; }

  .shape-tab {
    font-size: 0.68rem;
    padding: 8px 2px;
  }

  /* Smaller export buttons grid: 2 columns */
  .export-btn {
    flex: 1 1 calc(50% - 3px);
    font-size: 0.74rem;
    padding: 8px 6px;
  }
  .export-btn svg { width: 14px; height: 14px; }

  .fc-export-row .export-btn { flex: 1 1 calc(50% - 3px); }

  /* Result primary */
  .primary-value { font-size: 2.2rem; }
  .primary-value .unit { font-size: 0.8rem; }

  /* Section padding */
  .section { padding: 44px 0; }

  /* Article body */
  .article-body { font-size: 0.96rem; }
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  /* Feeding calc tweaks */
  .fc-schedule-block { padding: 14px 16px; }
  .fc-result-species { font-size: 1.35rem; }
  .fc-clock { gap: 6px; }
  .fc-time-pill { font-size: 0.72rem; padding: 4px 9px; }

  /* CTA */
  .cta-band { padding: 44px 0; }
  .cta-band h2 { font-size: 1.4rem; }

  /* Footer brand */
  .footer-col .brand { font-size: 1rem; }
}

/* ---------- Tiny phone (max 360px) — last-resort layout ---------- */
@media (max-width: 360px) {
  .container { padding: 0 14px; }
  h1 { font-size: 1.45rem; }
  .hero-meta strong { font-size: 1.05rem; }
  .shape-tab svg { display: none; }
  .shape-tab { flex-direction: row; gap: 4px; padding: 9px 2px; }
}

/* ---------- Landscape phone — shorter hero ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 30px 0 30px; }
  .page-hero { padding: 60px 0 30px; }
  .article-hero { padding: 70px 0 30px; }
}

/* ---------- Touch-friendly tap targets ---------- */
@media (pointer: coarse) {
  .btn, .btn-calc, .btn-reset, .export-btn, .nav-list a, .shape-tab, .unit-pill {
    min-height: 44px;
  }
  .faq-summary { min-height: 56px; }
  .footer-socials a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Print styles ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .hero-cta, .calc-actions,
  .fc-actions, .export-row, .fc-export-row, .article-share, .blog-grid {
    display: none !important;
  }
  .hero, .article-hero, .page-hero { padding: 20px 0; background: none; }
  .calc-result-pane, .fc-result-pane {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc;
  }
  .calc-result-pane *, .fc-result-pane * { color: #000 !important; }
  body { background: #fff; }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; padding: 0 20px; }
}


/* ============================================
   FEEDING TEASER (homepage)
   Class-based replacement for inline-styled section.
   ============================================ */
.feeding-teaser-section { padding-top: 30px; padding-bottom: 30px; }

.feeding-teaser {
  background: linear-gradient(135deg, var(--deep) 0%, var(--tide) 100%);
  border-radius: var(--rad);
  padding: 60px 40px;
  color: var(--foam);
  position: relative;
  overflow: hidden;
}
.feeding-teaser-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,144,22,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.feeding-teaser-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.feeding-teaser-text h2 {
  color: var(--foam);
  margin-bottom: 18px;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.2;
}
.feeding-teaser-text h2 em { font-style: italic; color: var(--amber); }
.feeding-teaser-text .eyebrow--amber { color: var(--amber); margin-bottom: 18px; }
.feeding-teaser-text > p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 560px;
  line-height: 1.65;
}
.feeding-teaser-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.btn--amber:hover { background: #ffa53d; border-color: #ffa53d; }

.feeding-teaser-stats {
  display: flex;
  gap: 30px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.feeding-teaser-stats > div { display: flex; flex-direction: column; }
.feeding-teaser-stats strong {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--amber);
  font-weight: 500;
  line-height: 1;
}
.feeding-teaser-stats span {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.feeding-teaser-art { text-align: center; }
.feeding-teaser-art svg {
  max-width: 320px;
  width: 100%;
  height: auto;
}

/* Section variant (replaces inline mist style) */
.section--mist {
  background: var(--mist);
  border-top: 1px solid var(--silver);
  border-bottom: 1px solid var(--silver);
}

/* ---- Feeding teaser responsive ---- */
@media (max-width: 900px) {
  .feeding-teaser { padding: 50px 32px; }
  .feeding-teaser-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .feeding-teaser-text > p { margin-left: auto; margin-right: auto; }
  .feeding-teaser-cta { justify-content: center; }
  .feeding-teaser-stats { justify-content: center; }
  .feeding-teaser-art svg { max-width: 240px; }
}
@media (max-width: 700px) {
  .feeding-teaser { padding: 40px 24px; }
  .feeding-teaser-grid { gap: 28px; }
  .feeding-teaser-text h2 { font-size: 1.45rem; }
  .feeding-teaser-text > p { font-size: 0.95rem; margin-bottom: 22px; }
  .feeding-teaser-cta .btn { width: 100%; justify-content: center; }
  .feeding-teaser-stats {
    gap: 0;
    margin-top: 28px;
    width: 100%;
    justify-content: space-around;
  }
  .feeding-teaser-stats > div {
    flex: 1;
    padding: 0 4px;
    min-width: 0;
  }
  .feeding-teaser-stats strong { font-size: 1.15rem; }
  .feeding-teaser-stats span { font-size: 0.6rem; letter-spacing: 1px; }
  .feeding-teaser-glow { width: 180px; height: 180px; top: -20px; right: -20px; }
  .feeding-teaser-art svg { max-width: 200px; }
}
@media (max-width: 480px) {
  .feeding-teaser { padding: 32px 20px; }
  .feeding-teaser-text h2 { font-size: 1.3rem; }
  .feeding-teaser-stats strong { font-size: 1rem; }
}

/* ============================================
   EXPERT PORTRAIT — supports custom image
   Drop "marcus.jpg" (or .png/.webp) into public_html
   to replace the SVG placeholder automatically.
   ============================================ */
.expert-portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,144,22,0.15) 0%, rgba(255,144,22,0.04) 100%);
  border: 3px solid rgba(255,144,22,0.3);
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.expert-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.expert-portrait svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 700px) {
  .expert-portrait {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }
}


/* ============================================
   ABOUT PAGE INTRO BLOCK with portrait
   ============================================ */
.about-intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--silver);
}
.about-intro h2 {
  margin-top: 0;
}
.about-portrait {
  margin: 0;
}

@media (max-width: 700px) {
  .about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: left;
  }
  .about-portrait {
    margin: 0 auto;
  }
}


/* Eyebrow color variants */
.eyebrow--amber { color: var(--amber) !important; }
.eyebrow--light { color: rgba(255,255,255,0.7) !important; }


/* ============================================
   BLOG CATEGORY FILTERS
   ============================================ */
.blog-filter-section {
  padding: 0 0 16px;
  position: sticky;
  top: 70px;
  z-index: 40;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(21, 57, 123, 0.08);
}

.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 18px;
  align-items: center;
}

.blog-filter-btn {
  background: transparent;
  border: 1.5px solid var(--silver);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: var(--body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.1px;
}

.blog-filter-btn:hover {
  border-color: var(--tide);
  color: var(--tide);
  transform: translateY(-1px);
}

.blog-filter-btn.active {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--foam);
}

.blog-filter-btn.active:hover {
  background: var(--tide);
  border-color: var(--tide);
}

.blog-filter-btn .filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: rgba(11, 31, 68, 0.08);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: background 0.22s var(--ease);
}

.blog-filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--foam);
}

.blog-filter-btn--empty {
  opacity: 0.45;
  cursor: not-allowed;
}
.blog-filter-btn--empty:hover {
  transform: none;
  border-color: var(--silver);
  color: var(--ink);
}

/* ---- Filter responsive ---- */
@media (max-width: 700px) {
  .blog-filter-section {
    top: 64px;
  }
  .blog-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 0 14px;
    margin: 0 -22px;
    padding-left: 22px;
    padding-right: 22px;
    scrollbar-width: none;
  }
  .blog-filter-bar::-webkit-scrollbar { display: none; }
  .blog-filter-btn {
    padding: 9px 14px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }
}

/* ============================================
   BLOG CARD with image
   ============================================ */
.blog-list-section { padding-top: 30px; }

.blog-card {
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.blog-card--hidden {
  display: none;
}

.blog-card-img-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--mist);
}

.blog-card-img {
  width: 100%;
  height: 100%;
  position: relative;
}

.blog-card-img img,
.blog-card-img svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}

.blog-card-img-link:hover img,
.blog-card-img-link:hover svg {
  transform: scale(1.04);
}

.blog-card-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
}

.blog-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s var(--ease);
}
.blog-card h3 a:hover { color: var(--tide); }

/* ============================================
   BLOG EMPTY STATE
   ============================================ */
.blog-empty-state {
  text-align: center;
  padding: 80px 28px;
  background: var(--mist);
  border-radius: var(--rad);
  margin: 30px 0;
}
.blog-empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--tide);
  opacity: 0.4;
  margin-bottom: 16px;
}
.blog-empty-state h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--deep);
}
.blog-empty-state p {
  max-width: 440px;
  margin: 0 auto 28px;
  color: rgba(11, 31, 68, 0.7);
  line-height: 1.6;
}

/* ============================================
   BLOG PROMISE (footer note)
   ============================================ */
.blog-promise {
  text-align: center;
  margin-top: 60px;
  padding: 40px 28px;
  background: var(--mist);
  border-radius: var(--rad);
}
.blog-promise-lead {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--deep);
  margin-bottom: 8px;
  font-weight: 500;
}
.blog-promise p:last-child {
  color: rgba(11, 31, 68, 0.7);
  margin: 0;
  font-size: 0.95rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   ARTICLE HEADER IMAGE (full-width hero photo)
   ============================================ */
.article-header-image {
  width: 100%;
  max-width: 1100px;
  margin: 30px auto 50px;
  padding: 0 32px;
}
.article-header-image-wrap {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: var(--rad);
  overflow: hidden;
  background: var(--mist);
  position: relative;
  box-shadow: 0 30px 60px -30px rgba(11, 31, 68, 0.25);
}
.article-header-image-wrap img,
.article-header-image-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-header-image-caption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: rgba(11, 31, 68, 0.55);
  font-style: italic;
  text-align: center;
  font-family: var(--display);
}

@media (max-width: 700px) {
  .article-header-image {
    margin: 20px auto 36px;
    padding: 0 22px;
  }
  .article-header-image-wrap {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }
}

/* ============================================
   INLINE IMAGES inside article body
   Use class "article-inline-img" inside <figure>
   ============================================ */
.article-body figure.article-inline-img {
  margin: 36px 0;
  padding: 0;
}
.article-body figure.article-inline-img img,
.article-body figure.article-inline-img svg {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  background: var(--mist);
}
.article-body figure.article-inline-img figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(11, 31, 68, 0.6);
  font-style: italic;
  text-align: center;
  font-family: var(--display);
  line-height: 1.5;
}

/* Wide variant — breaks out of column for larger images */
.article-body figure.article-inline-img.is-wide {
  margin-left: -40px;
  margin-right: -40px;
}
@media (max-width: 1000px) {
  .article-body figure.article-inline-img.is-wide {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Two-column inline image layout */
.article-body figure.article-inline-img.is-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.article-body figure.article-inline-img.is-split figcaption {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .article-body figure.article-inline-img.is-split {
    grid-template-columns: 1fr;
  }
}


/* ============================================
   HEADER MOBILE FIX — proper layout at all sizes
   This block overrides earlier breakpoint rules to
   guarantee the brand + hamburger fit cleanly.
   ============================================ */

/* Make sure the header has a solid background on mobile */
@media (max-width: 900px) {
  .site-header {
    height: auto;
    background: var(--paper);            /* solid, not translucent */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid var(--silver);
    z-index: 100;
  }
  .header-inner {
    padding: 12px 22px;
    min-height: 64px;
  }
  .brand {
    font-size: 1.1rem;
    gap: 10px;
    flex: 1;
    min-width: 0;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand small {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    margin-top: 2px;
  }
  .nav-toggle {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-left: 12px;
  }

}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 16px;
    min-height: 60px;
  }
  .brand {
    font-size: 1rem;
    gap: 8px;
  }
  .brand small {
    display: block;       /* keep tagline visible — was hidden before */
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .brand-mark svg { width: 16px; height: 16px; }
  .nav-toggle {
    width: 40px;
    height: 40px;
    margin-left: 8px;
  }
}

@media (max-width: 380px) {
  .brand { font-size: 0.92rem; }
  .brand small { display: none; } /* only hide on truly tiny phones */
}

/* (Removed conflicting mobile nav rules — see consolidated block at end of file) */


/* ============================================
   BACK-TO-TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--foam);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.22s var(--ease);
  z-index: 90;
  box-shadow: 0 12px 28px -8px rgba(11, 31, 68, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--tide);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Subtle progress ring around the button */
.back-to-top::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 144, 22, 0.3);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.back-to-top.visible::before {
  opacity: 1;
}

@media (max-width: 700px) {
  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
  }
  .back-to-top svg { width: 18px; height: 18px; }
}

/* When mobile nav is open, hide the back-to-top button */
.nav-list.open ~ .back-to-top,
body:has(.nav-list.open) .back-to-top {
  opacity: 0 !important;
  visibility: hidden !important;
}


/* ============================================
   FINAL MOBILE NAV OVERRIDE
   This block sits at the END of the stylesheet to win specificity
   battles with earlier conflicting rules. It uses opacity+visibility
   instead of transform for reliable hiding across all devices.
   ============================================ */

@media (max-width: 900px) {
  /* Hamburger button visible on mobile */
  .nav-toggle {
    display: inline-flex !important;
  }

  /* Closed state — menu fully invisible AND non-interactive */
  .nav-list {
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--paper) !important;
    border-top: 1px solid var(--silver) !important;
    border-bottom: 1px solid var(--silver) !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 8px 0 !important;
    margin: 0 !important;

    /* Reliable hiding — no transform funkiness */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-12px) !important;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s !important;

    box-shadow: 0 14px 30px -16px rgba(11, 31, 68, 0.18) !important;
    z-index: 49;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  /* Open state — fully visible and clickable */
  .nav-list.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  /* Menu items take full width */
  .nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--silver);
    margin: 0;
  }
  .nav-list li:last-child { border-bottom: none; }

  .nav-list a {
    display: block !important;
    padding: 16px 24px !important;
    width: 100%;
    border-radius: 0;
    font-size: 1rem;
    color: var(--ink);
  }
  .nav-list a::after { display: none !important; }
  .nav-list a.active {
    background: var(--mist);
    color: var(--deep);
  }
}

/* Smaller phones — adjust top offset to match shorter header */
@media (max-width: 480px) {
  .nav-list {
    top: 60px !important;
    max-height: calc(100vh - 60px);
  }
}

/* When mobile menu is open, prevent body scroll so the menu doesn't
   feel disconnected from the page */
body.menu-open {
  overflow: hidden;
}


/* ============================================
   HEADER FINAL OVERRIDE — solid background on mobile
   Fixes iOS Safari backdrop-filter rendering issues
   ============================================ */

@media (max-width: 900px) {
  .site-header {
    background: var(--paper) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-bottom: 1px solid var(--silver) !important;
    height: 64px !important;
    z-index: 100 !important;
  }
  .header-inner {
    padding: 0 22px !important;
    height: 64px !important;
    min-height: 64px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 1.1rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
  }
  .brand-mark {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }
  .brand-mark svg { width: 18px !important; height: 18px !important; }
  .brand > span:not(.brand-mark) {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .brand small {
    display: block !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.16em !important;
    margin-top: 2px;
  }
  .nav-toggle {
    flex-shrink: 0 !important;
    width: 42px !important;
    height: 42px !important;
    margin-left: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--deep) !important;
    color: var(--foam) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
  }
  .nav-toggle svg {
    width: 22px !important;
    height: 22px !important;
    color: var(--foam);
  }
}

@media (max-width: 480px) {
  .site-header { height: 60px !important; }
  .header-inner {
    padding: 0 16px !important;
    height: 60px !important;
    min-height: 60px !important;
  }
  .brand { font-size: 1rem !important; gap: 8px !important; }
  .brand-mark { width: 30px !important; height: 30px !important; }
  .brand-mark svg { width: 16px !important; height: 16px !important; }
  .brand small { font-size: 0.54rem !important; letter-spacing: 0.14em !important; }
  .nav-toggle {
    width: 40px !important;
    height: 40px !important;
    margin-left: 8px !important;
  }
  .nav-toggle svg { width: 20px !important; height: 20px !important; }
}

@media (max-width: 360px) {
  .brand { font-size: 0.92rem !important; }
  .brand small { display: none !important; }
}

