/* DIY Calc — Workshop Premium Theme */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg: #1a1612;
  --bg-card: #231f1a;
  --bg-input: #2c2620;
  --bg-hover: #342d25;
  --border: #3d352b;
  --border-subtle: #2f2820;
  --text: #e8e0d4;
  --text-muted: #9b8e7e;
  --text-bright: #f5efe8;
  --accent: #c78c4e;
  --accent-light: #daa76a;
  --accent-dim: rgba(199, 140, 78, 0.12);
  --accent-glow: rgba(199, 140, 78, 0.08);
  --green: #6db87a;
  --green-light: #8fd49a;
  --orange: #d4944a;
  --red: #c96b6b;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 20px rgba(0,0,0,0.4);
  --max-w: 720px;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Sora', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-bright); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem 1rem; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.25rem; }

/* Header */
.site-header {
  text-align: center;
  padding: 3rem 0 1.5rem;
  position: relative;
}

.site-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 1.25rem auto 0;
}

.site-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-header .logo-accent { color: var(--accent); }

.site-header .tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.4rem;
  font-weight: 400;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.back-link:hover { color: var(--accent-light); background: var(--accent-dim); text-decoration: none; }

/* Calculator Cards Grid (index) */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.calc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.calc-card:hover::before { opacity: 1; }

.calc-card .icon {
  font-size: 1.5rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
}

.calc-card .card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.calc-card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.calc-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  flex: 1;
  line-height: 1.5;
}

.calc-card .arrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

/* Card (general) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Form Elements */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-heading);
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  font-family: var(--font-body);
  background: var(--bg-input);
  color: var(--text-bright);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -moz-appearance: textfield;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.input-group { display: flex; flex-direction: column; }

/* Slab / Area Sections */
.area-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}
.area-section .area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.area-section .area-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.area-sub-result {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: #b37d42; box-shadow: 0 4px 16px rgba(199, 140, 78, 0.25); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-danger {
  background: transparent;
  color: var(--red);
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid transparent;
}
.btn-danger:hover { border-color: var(--red); }

/* Results */
.results {
  background: linear-gradient(135deg, rgba(199,140,78,0.06), rgba(109,184,122,0.04));
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.25rem;
}
.results h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.result-item {
  text-align: center;
  padding: 1rem 0.75rem;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.result-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1.2;
}
.result-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
  font-size: 0.95rem;
}

/* Tips */
.tips {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.tips h3 {
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tips ul { list-style: none; }
.tips li {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}
.tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Diagram */
.diagram {
  text-align: center;
  margin: 1rem 0;
}
.diagram svg { max-width: 280px; width: 100%; height: auto; }

/* Shape toggle */
.shape-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.shape-toggle button {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-heading);
  background: var(--bg-input);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.shape-toggle button.active {
  background: var(--accent);
  color: var(--bg);
}

/* Other calculators */
.other-calcs {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.other-calcs h3 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.other-calcs-grid {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.other-calcs-grid a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}
.other-calcs-grid a:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  text-decoration: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2rem;
}

/* ===== HOME NAV ===== */
.home-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26,22,18,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.home-nav .container-wide {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem;
  color: var(--text-bright); letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--text-bright); }
.nav-right { display: flex; gap: 0.5rem; }
.nav-link {
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-bright); background: var(--bg-card); }

/* ===== HERO HOME ===== */
.hero-home {
  text-align: center; padding: 5rem 1rem 3rem;
  position: relative;
}
.hero-home::before {
  content: ''; position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 350px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-home > * { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 600; color: var(--accent);
  background: var(--accent-dim); border: 1px solid rgba(199,140,78,0.2);
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.hero-home h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 1.25rem; letter-spacing: -0.04em;
}
.hero-home h1 .accent { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted); max-width: 480px;
  margin: 0 auto; line-height: 1.6;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin-top: 2rem;
}
.hs { text-align: center; }
.hs-val { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: var(--accent); display: block; }
.hs-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.hs-dot { width: 3px; height: 3px; background: var(--text-muted); border-radius: 50%; opacity: 0.5; }

/* ===== CALC SECTIONS ===== */
.calc-section { margin-bottom: 1rem; }
.calc-section .section-label {
  font-family: var(--font-heading); font-size: 0.75rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
  padding-top: 1.5rem;
}

/* ===== VALUE PROPS ===== */
.content-section { padding: 4rem 0; }
.content-section.alt { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cs-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center;
  margin-bottom: 2.5rem; letter-spacing: -0.03em;
}
.value-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.value-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.5rem;
  transition: border-color var(--transition);
}
.value-card:hover { border-color: var(--accent); }
.vc-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border: 1px solid rgba(199,140,78,0.2);
  border-radius: 10px; margin-bottom: 1rem;
}
.value-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.value-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ===== HOW IT WORKS STEPS ===== */
.steps-row {
  display: flex; align-items: flex-start; justify-content: center; gap: 1.5rem;
}
.step {
  flex: 1; max-width: 280px; text-align: center;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--bg); font-family: var(--font-heading);
  font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.step-arrow { display: flex; align-items: center; padding-top: 0.5rem; }

/* ===== FAQ (HOME) ===== */
.faq-list { max-width: 680px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 1.15rem 0; color: var(--text-bright);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-heading);
  display: flex; justify-content: space-between; align-items: center;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--accent); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--text-muted); transition: transform 0.2s ease; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q::after { transform: rotate(45deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; padding-bottom: 1rem; }

/* ===== FOOTER ===== */
.footer-tools {
  margin-bottom: 1.5rem; padding: 1.5rem;
  background: rgba(0,0,0,0.15); border-radius: var(--radius);
  text-align: center;
}
.ft-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.ft-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.ft-grid a {
  font-size: 0.85rem; font-weight: 600; color: var(--accent-light);
  display: flex; align-items: center; gap: 0.5rem;
}
.ft-grid a span { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); }
.footer-copy { text-align: center; font-size: 0.78rem; color: var(--text-muted); }

/* Print */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .back-link, .tips, .other-calcs, .site-footer, .btn, .area-header .btn-danger { display: none; }
  .results { border-color: #000; background: #f5f5f5; }
  .result-value { color: #000; }
}

/* Responsive */
@media (max-width: 768px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-row { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
}

@media (max-width: 480px) {
  .site-header h1 { font-size: 1.6rem; }
  .input-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-value { font-size: 1.5rem; }
  .container { padding: 1rem 0.75rem; }
  .container-wide { padding: 1rem 0.75rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem; }
  .hero-home { padding: 3.5rem 1rem 2rem; }
}

/* Blog hero image */
.blog-hero { max-width: 900px; margin: 0 auto 2rem; padding: 0 1.25rem; }
.blog-hero img { width: 100%; height: 300px; object-fit: cover; border-radius: 12px; display: block; }

