/* Radhe Steel — weight calculator styles */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/geist-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/geist-mono-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper: #F3EFE7; --paper-2: #ECE7DB; --paper-3: #E4DECF; --card: #FBF8F1;
  --ink: #1A1C1B; --ink-2: #2F332F; --muted: #6B6962; --mute-2: #9A978E;
  --line: #D8D2C0; --line-soft: #E5DFD0;
  /* Layered shadow for bordered cards: the border is the edge, then contact and soft lift */
  --shadow-lift: 0 2px 4px rgb(26 28 27 / 0.06), 0 12px 28px -6px rgb(26 28 27 / 0.16);
  --accent: #5C6B4E; --accent-2: #4A5740; --accent-soft: #D9DCC8; --accent-wash: #E8E6D6;
  --clay: #A96A42; --clay-wash: #F1E3D6;
  --font-display: 'Instrument Serif', ui-serif, Georgia, serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

/* ─── HEADER ─── */
header { border-bottom: 1px solid var(--line-soft); background: var(--paper); }
.nav { max-width: 1240px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.nav-logo .brand { font-family: var(--font-display); font-size: 24px; line-height: 1; display: block; }
.nav-logo .sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-back { font-size: 15px; color: var(--ink-2); text-decoration: none; }
.nav-back:hover { color: var(--accent); }
.btn-primary { background: var(--ink); color: var(--paper); font: 500 15px var(--font-body); padding: 12px 24px; border: none; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: background 0.2s, transform 0.15s; }
.btn-primary:hover { background: var(--accent-2); color: var(--paper); }

/* ─── INTRO ─── */
.intro { max-width: 1240px; margin: 0 auto; padding: 64px 40px 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 22px; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--muted); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -0.025em; max-width: 900px; }
h1 em { font-style: italic; color: var(--accent); }
.intro p { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 600px; }

/* ─── CALCULATOR ─── */
.calc { max-width: 1240px; margin: 0 auto; padding: 0 40px 88px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.9fr); gap: 24px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-lift); }
.step { margin-bottom: 28px; }
.step:last-child { margin-bottom: 0; }
.step-label { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; }
.step-label b { font-weight: 500; color: var(--ink); margin-right: 8px; }

.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.seg button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font: 500 14px var(--font-body); color: var(--ink-2); cursor: pointer; transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.2s var(--ease); }
.seg button:hover { border-color: var(--ink-2); }
.seg button svg { width: 30px; height: 30px; fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; transition: fill 0.25s, stroke 0.25s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg button[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--paper); }

.select-wrap { position: relative; }
.select-wrap::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select { width: 100%; appearance: none; -webkit-appearance: none; height: 56px; padding: 0 44px 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font: 500 16px var(--font-body); color: var(--ink); cursor: pointer; }
select:hover { border-color: var(--ink-2); }

.cond { margin-top: 14px; }
.sub-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.cond select { height: 48px; font-size: 15px; }
.cond select:disabled { opacity: 0.55; cursor: not-allowed; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field[hidden] { display: none; }
.field label { display: flex; justify-content: space-between; align-items: center; min-height: 22px; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 999px; opacity: 0; transform: translateY(4px) scale(0.9); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); text-transform: uppercase; }
.box { position: relative; display: flex; align-items: center; height: 60px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color 0.3s, background 0.3s, box-shadow 0.3s; }
.box:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 4px var(--accent-wash); }
.box input { flex: 1; min-width: 0; width: 0; height: 100%; padding: 0 0 0 18px; background: transparent; border: none; font: 500 22px var(--font-body); font-variant-numeric: tabular-nums; color: var(--ink); }
.box input::placeholder { color: var(--mute-2); font-weight: 400; }
.unit { padding: 0 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.box select { width: auto; height: 100%; border: none; border-left: 1px solid var(--line-soft); border-radius: 0; background: transparent; padding: 0 14px; font: 12px var(--font-mono); color: var(--muted); }
.hint { min-height: 18px; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* calculated field */
.field.is-calc .box { border-color: var(--accent); background: var(--accent-wash); }
.field.is-calc input { color: var(--accent-2); }
.field.is-calc .tag { opacity: 1; transform: none; background: var(--accent); color: var(--paper); }
.field.is-flash .box::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.75) 50%, transparent 80%); transform: translateX(-100%); animation: sweep 0.9s var(--ease) forwards; pointer-events: none; }
@keyframes sweep { to { transform: translateX(100%); } }

/* missing field */
.field.is-missing .box { border-color: var(--clay); background: var(--clay-wash); }
.field.is-missing .tag { opacity: 1; transform: none; background: transparent; color: var(--clay); border: 1px solid var(--clay); }
.field.is-nudge .box { animation: nudge 0.45s var(--ease); }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(169,106,66,0); } 50% { box-shadow: 0 0 0 5px rgba(169,106,66,0.16); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.field.is-invalid .box { border-color: #B4472F; }

.status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); font-size: 14px; color: var(--ink-2); transition: background 0.3s; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute-2); flex: none; }
.status.ok { background: var(--accent-wash); }
.status.ok .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status.need .dot { background: var(--clay); }
@keyframes blink { 50% { opacity: 0.3; } }
.chip { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--clay); color: var(--clay); animation: pop 0.4s var(--ease) both; text-transform: uppercase; }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } }
.actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.link-btn { position: relative; background: none; border: none; font: 500 14px var(--font-body); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.link-btn::after { content: ''; position: absolute; inset: -13px -8px; } /* 44px tap area */

/* ─── RESULT ─── */
.result { position: sticky; top: 24px; background: var(--ink); color: var(--paper); border-radius: 24px; padding: 32px; overflow: hidden; }
.result::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 0%, rgba(92,107,78,0.45), transparent 55%); pointer-events: none; }
.result > * { position: relative; }
.r-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--mute-2); text-transform: uppercase; }
.r-weight { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.r-weight .num { font-family: var(--font-display); font-size: clamp(56px, 6vw, 84px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: opacity 0.3s; }
.r-weight .u { font-family: var(--font-display); font-style: italic; font-size: 28px; color: var(--accent-soft); }
.result.empty .r-weight .num { opacity: 0.35; }
.r-sub { font-family: var(--font-mono); font-size: 12px; color: var(--mute-2); min-height: 18px; }
.visual { display: flex; align-items: center; gap: 20px; margin: 26px 0; padding: 20px; border: 1px solid rgba(243,239,231,0.12); border-radius: 16px; }
.visual svg.shape { width: 76px; height: 76px; flex: none; }
.visual svg.shape .s { fill: rgba(217,220,200,0.18); stroke: var(--accent-soft); stroke-width: 2; transform-origin: 50% 50%; animation: shapeIn 0.6s var(--ease); }
@keyframes shapeIn { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } }
.pieces { display: flex; flex-wrap: wrap; gap: 4px; align-content: center; flex: 1; min-height: 40px; }
.pieces i { display: block; width: 6px; height: 30px; border-radius: 3px; background: linear-gradient(180deg, #F3EFE7, #9A978E); animation: rise 0.45s var(--ease) both; }
@keyframes rise { from { transform: scaleY(0); opacity: 0; } }
.pieces span { font-family: var(--font-mono); font-size: 12px; color: var(--mute-2); align-self: center; margin-left: 4px; }
.r-rows { display: grid; gap: 0; }
.r-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(243,239,231,0.1); font-size: 14px; }
.r-rows dt { color: var(--mute-2); }
.r-rows dd { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }
.r-cta { display: grid; gap: 10px; margin-top: 24px; }
.btn-wa { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; transition: transform 0.15s, background 0.2s; }
.btn-wa:hover { background: #fff; color: var(--ink); }
.btn-wa svg { width: 18px; height: 18px; color: #128C4A; }
.btn-line { text-align: center; padding: 12px 24px; border-radius: 999px; border: 1px solid rgba(243,239,231,0.25); color: var(--paper); text-decoration: none; font-size: 14px; }
.btn-line:hover { border-color: var(--paper); color: var(--paper); }
.result.empty .r-cta { opacity: 0.4; pointer-events: none; }
.note { margin-top: 16px; font-size: 12px; color: var(--mute-2); }

/* ─── REFERENCE ─── */
.ref { background: var(--paper-2); border-top: 1px solid var(--line-soft); }
.ref-inner { max-width: 1240px; margin: 0 auto; padding: 80px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.ref h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.12; margin-bottom: 20px; }
.ref h2 em { font-style: italic; color: var(--accent); }
.ref p { color: var(--ink-2); margin-bottom: 20px; }
.formula { display: grid; gap: 10px; }
.formula div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; font-size: 14px; }
.formula code { font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); text-align: right; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; font-size: 14px; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); font-weight: 400; background: var(--paper); text-transform: uppercase; }
td:last-child, th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }


@media (max-width: 960px) {
  .nav { padding: 14px 20px; }
  .intro { padding: 40px 20px 28px; }
  .calc { grid-template-columns: 1fr; padding: 0 16px 64px; }
  .panel, .result { padding: 22px; }
  .result { position: static; }
  .ref-inner { grid-template-columns: 1fr; padding: 56px 20px; gap: 40px; }
}
@media (max-width: 520px) {
  .seg { grid-template-columns: repeat(2, 1fr); }
  .fields { grid-template-columns: 1fr; }
}
/* Mobile menu: the button is wired in analytics.js (adds .nav-open to the header) */
.nav-menu { display: flex; align-items: center; gap: 20px; }
.nav-toggle { display: none; }
@media (max-width: 960px) {
  header { position: relative; z-index: 110; }
  .nav-right { gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; flex: none; font: 500 14px var(--font-body); color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; } /* icon + visible "Menu" label */
  .nav-toggle::before { content: ''; width: 14px; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav-open .nav-toggle { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .nav-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 4px 20px 12px; box-shadow: 0 24px 30px -24px rgba(0,0,0,0.35); }
  .nav-open .nav-menu { display: flex; }
  .nav-menu .nav-back { display: block; padding: 14px 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
  .nav-menu .nav-back:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
  .nav-logo { gap: 9px; }
  .nav-logo svg { width: 32px; height: 32px; }
  .nav-logo .brand { font-size: 21px; }
  .nav-logo .sub { display: none; }
  .nav-right .btn-primary { position: relative; padding: 10px 20px; font-size: 14px; white-space: nowrap; }
  .nav-right .btn-primary::after { content: ''; position: absolute; inset: -3px 0; } /* 44px tap area */
}
/* Phones: the wordmark, "Request quote" and the labelled Menu button share one line */
@media (max-width: 420px) { .nav-logo svg { display: none; } .nav-logo .brand { white-space: nowrap; } .nav-right { gap: 8px; } .nav-toggle { padding: 0 12px; } }
/* Under 350px there is no room for the word: icon only, the text stays for screen readers */
@media (max-width: 350px) { .nav-toggle { font-size: 0; gap: 0; width: 44px; padding: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* ─── ADDED: shared page pieces ─── */
[hidden] { display: none !important; }
address { font-style: normal; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 200; font-size: 14px; }
.skip-link:focus { left: 0; }
.box input:focus-visible { outline: none; }
.crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.byline { margin-top: 14px; font-size: 14px; color: var(--muted); }
.byline a { color: var(--accent-2); }
.example { margin-top: 20px; }
.ref p a, .faq-a a { color: var(--accent-2); }
table caption { caption-side: top; text-align: left; padding: 0 0 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
/* FAQ */
.faq { max-width: 1240px; margin: 0 auto; padding: 80px 40px; }
.faq h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.12; margin-bottom: 28px; }
.faq h2 em { font-style: italic; color: var(--accent); }
.faq-list { display: grid; gap: 12px; max-width: 920px; }
.faq-item { background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; padding: 0 24px; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0; font-size: 18px; font-weight: 500; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-mono); font-size: 20px; color: var(--accent); transition: transform 0.25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 22px; color: var(--ink-2); line-height: 1.65; }
@media (max-width: 960px) {
  .faq { padding: 56px 20px; }
}

/* Weight chart (kg per metre) */
.chart .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart th, .chart td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.chart thead th { background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; }
.chart tbody th { font-weight: 500; background: var(--accent-wash, #E8E6D6); }
.chart td { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
/* Quantity columns right-aligned with their headers; the grade and link columns stay left */
.chart thead th { text-align: right; }
.chart .by-grade thead th:first-child, .chart .by-grade thead th:last-child, .chart .by-grade td:last-child { text-align: left; }
.chart .sizes tbody th { text-align: right; font-variant-numeric: tabular-nums; }
.chart .note { margin-top: 10px; font-size: 13px; color: var(--muted); font-style: italic; }
