/* ═══════════════════════════════════════════════════
   Groop Tools — shared design system
   ═══════════════════════════════════════════════════ */

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

:root {
  --bg:       #F5F0EA;
  --surface:  #FFFFFF;
  --red:      #FC3C44;
  --red-dark: #B81828;
  --red-soft: #FFF0F0;
  --text:     #111111;
  --text-mid: #444444;
  --text-dim: #888888;
  --border:   rgba(0,0,0,0.08);
  --green:    #1F9E5A;
  --max-w:    760px;
}

html { scroll-behavior: smooth; }

body {
  background-color: #F4EEE7;
  background-image:
    radial-gradient(58vw 58vw at 10% -10%, rgba(252,60,68,0.18), transparent 60%),
    radial-gradient(52vw 52vw at 102% 2%, rgba(255,158,92,0.16), transparent 55%),
    radial-gradient(48vw 48vw at 88% 108%, rgba(252,60,68,0.12), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--red-dark); }

/* ─── NAV ─────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 40px);
  max-width: 920px;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.95);
}
.nav-inner {
  position: relative;
  padding: 0 16px; height: 54px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.nav-wordmark { font-size: 15px; font-weight: 700; color: #111111; letter-spacing: -0.2px; }
.nav-menu { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: #444444; text-decoration: none; transition: color 0.18s; }
.nav-links a:hover { color: #111111; }
.nav-links a.active { color: #111111; font-weight: 600; }
.nav-cta {
  background: #FC3C44; color: white; font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 50px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0; transition: opacity 0.18s;
}
.nav-cta:hover { opacity: 0.88; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; padding: 7px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #111111; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── PAGE SHELL ──────────────────────────────────── */

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.breadcrumb {
  padding-top: 100px;
  font-size: 13px; color: var(--text-dim);
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

.tool-head { padding: 20px 0 8px; }
.tool-head .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--red-dark); margin-bottom: 16px;
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 14px rgba(252,60,68,0.10);
  padding: 6px 14px; border-radius: 50px;
}

/* Decorative glass hero image band (optional per page) */
.tool-hero {
  position: relative;
  margin: 8px 0 4px;
  height: 200px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 18px 50px rgba(30,10,10,0.16), inset 0 1px 0 rgba(255,255,255,0.6);
}
.tool-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(252,60,68,0.42), rgba(184,24,40,0.14) 55%, transparent);
}
.tool-head h1 {
  font-size: clamp(30px, 5vw, 44px); font-weight: 800;
  letter-spacing: -1.5px; line-height: 1.08; margin-bottom: 16px;
}
.tool-head .lede { font-size: 18px; color: var(--text-mid); line-height: 1.6; max-width: 620px; }

/* ─── CALCULATOR CARD ─────────────────────────────── */

.calc {
  position: relative;
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 24px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 18px 50px rgba(30,10,10,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-mid); margin-bottom: 8px;
}
.field input, .field select {
  width: 100%; height: 48px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'Inter', sans-serif; font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.field input:focus, .field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(252,60,68,0.14); }

/* Segmented toggle (e.g. metric / imperial, male / female) */
.seg { display: inline-flex; background: rgba(255,255,255,0.5); border: 1px solid rgba(0,0,0,0.07); border-radius: 12px; padding: 4px; gap: 4px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); }
.seg button {
  border: none; background: none; font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text-mid);
  padding: 8px 16px; border-radius: 9px; cursor: pointer; transition: all 0.15s;
}
.seg button.on { background: rgba(255,255,255,0.95); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9); }

.calc-btn {
  width: 100%; height: 52px; margin-top: 8px;
  background: linear-gradient(180deg, #FF4D55, #E22630);
  border: none; border-radius: 14px;
  color: white; font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; letter-spacing: -0.2px; transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 10px 26px rgba(252,60,68,0.34), inset 0 1px 0 rgba(255,255,255,0.4);
}
.calc-btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 14px 32px rgba(252,60,68,0.42), inset 0 1px 0 rgba(255,255,255,0.4); }

/* ─── RESULT ──────────────────────────────────────── */

.result {
  margin-top: 24px; padding: 28px;
  background: linear-gradient(160deg, rgba(255,236,238,0.9), rgba(255,214,218,0.55));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(252,60,68,0.25);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 30px rgba(252,60,68,0.12);
  display: none;
}
.result.show { display: block; animation: pop 0.35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.result .big { font-size: clamp(34px, 6vw, 48px); font-weight: 800; letter-spacing: -1.5px; color: var(--red-dark); line-height: 1; }
.result .big small { font-size: 18px; font-weight: 600; color: var(--text-mid); letter-spacing: 0; }
.result .sub { font-size: 15px; color: var(--text-mid); margin-top: 10px; line-height: 1.6; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 20px; }
.result-stat { background: rgba(255,255,255,0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.7); border-radius: 14px; padding: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.9); }
.result-stat .v { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.result-stat .l { font-size: 12px; color: var(--text-dim); margin-top: 4px; font-weight: 500; }

.result ul.plain { list-style: none; margin-top: 16px; }
.result ul.plain li { font-size: 15px; color: var(--text-mid); padding: 6px 0; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.06); }
.result ul.plain li:last-child { border-bottom: none; }
.result ul.plain li b { color: var(--text); font-weight: 700; }

/* ─── PROSE CONTENT ───────────────────────────────── */

.prose { padding: 24px 0 8px; }
.prose h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; margin: 40px 0 16px; }
.prose h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; margin: 28px 0 10px; }
.prose p { font-size: 16px; color: var(--text-mid); line-height: 1.75; margin-bottom: 16px; }
.prose ul, .prose ol { color: var(--text-mid); font-size: 16px; line-height: 1.75; margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--red-dark); }
.prose .formula {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px; margin: 20px 0;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px;
  color: var(--text); line-height: 1.7; overflow-x: auto;
}
.prose .note {
  background: var(--red-soft); border-left: 3px solid var(--red);
  border-radius: 8px; padding: 14px 18px; margin: 20px 0;
  font-size: 15px; color: var(--text-mid);
}

/* ─── FAQ ─────────────────────────────────────────── */

.faq { padding: 16px 0; }
.faq h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; margin-bottom: 8px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { font-size: 17px; font-weight: 700; color: var(--text); padding: 20px 0 8px; }
.faq-a { font-size: 15px; color: var(--text-mid); line-height: 1.7; padding-bottom: 20px; }

/* ─── EMAIL CAPTURE ───────────────────────────────── */

.capture {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.72), rgba(255,240,240,0.5));
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  padding: 36px 32px;
  margin: 48px 0;
  text-align: center;
  box-shadow: 0 18px 50px rgba(30,10,10,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.capture h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 8px; }
.capture p { font-size: 15px; color: var(--text-mid); margin-bottom: 20px; line-height: 1.6; }
.capture form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.capture input {
  flex: 1; height: 48px; background: rgba(255,255,255,0.75); border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px; padding: 0 16px; font-family: 'Inter', sans-serif;
  font-size: 15px; color: var(--text); outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.capture input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(252,60,68,0.14); }
.capture input.error { border-color: var(--red); }
.capture button {
  height: 48px; padding: 0 22px; border: none; border-radius: 12px;
  background: linear-gradient(180deg, #FF4D55, #E22630);
  color: white; font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: filter 0.15s, transform 0.15s;
  box-shadow: 0 8px 22px rgba(252,60,68,0.32), inset 0 1px 0 rgba(255,255,255,0.4);
}
.capture button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.capture .done { font-size: 16px; font-weight: 600; color: var(--green); display: none; }
.capture.sent form { display: none; }
.capture.sent .done { display: block; }
.capture .fine { font-size: 12px; color: var(--text-dim); margin-top: 12px; margin-bottom: 0; }

/* ─── RELATED TOOLS ───────────────────────────────── */

.related { padding: 24px 0 40px; }
.related h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card {
  display: block;
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 16px; padding: 18px; text-decoration: none; color: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 6px 20px rgba(30,10,10,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(30,10,10,0.12), inset 0 1px 0 rgba(255,255,255,0.9); }
.related-card .t { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; margin-bottom: 4px; }
.related-card .d { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ─── FOOTER ──────────────────────────────────────── */

footer { border-top: 1px solid var(--border); padding: 32px 24px; text-align: center; margin-top: 40px; }
footer p { font-size: 13px; color: var(--text-dim); }
footer a { color: var(--text-dim); }

/* ─── MOBILE ──────────────────────────────────────── */

@media (max-width: 720px) {
  .nav { width: calc(100% - 24px); top: 12px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; top: calc(100% + 10px); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 16px; padding: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  }
  .nav.open .nav-menu { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-links a { display: block; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
  .nav-links a:hover { background: rgba(0,0,0,0.04); }
  .nav-cta { text-align: center; padding: 13px 18px; font-size: 14px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .calc { padding: 24px; }
  .related-grid { grid-template-columns: 1fr; }
  .capture form { flex-direction: column; }
}
