/* DIY Project Estimator — shared styles
   Mobile-first. One accent color. Large, readable numbers. */

:root {
  --bg: #ffffff;
  --surface: #f6f5f2;
  --surface-2: #eceae4;
  --text: #1d1f21;
  --muted: #5d6166;
  --border: #dedbd3;
  --accent: #e8590c;        /* safety orange */
  --accent-dark: #c2410c;
  --accent-soft: #fff1e8;
  --success: #2f7d32;
  --success-soft: #eaf5ea;
  --radius: 12px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 45px;
  height: 36px;
  flex: 0 0 45px;
  display: block;
  margin-top: -3px;
}

.logo-mark svg {
  display: block;
  width: 45px;
  height: 36px;
}

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

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
}

.site-nav.open { display: block; }

.site-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--surface-2);
}

.site-nav a:last-child { border-bottom: none; }
.site-nav a:hover { color: var(--accent); }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    padding: 0;
    border: none;
    gap: 24px;
  }
  .site-nav a {
    padding: 0;
    border: none;
    font-size: 15px;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 36px;
}

.hero h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

@media (min-width: 760px) {
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: 44px; }
}

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

.section h2 {
  font-size: 24px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 24px;
}

/* ---------- Tool grid ---------- */
.tool-group { margin-bottom: 32px; }

.tool-group h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 560px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
}

.tool-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(232, 89, 12, 0.12);
  color: var(--text);
}

.tool-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.tool-card h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.tool-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card.soon { opacity: 0.6; }

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}

.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- Text pages (about, privacy, terms, contact) ---------- */
.page {
  padding: 40px 0 56px;
}

.page .container { max-width: 760px; }

.page h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.page .updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.page h2 {
  font-size: 21px;
  margin: 32px 0 8px;
}

.page p,
.page li { color: #33373b; }

.page ul { padding-left: 22px; }

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}

.contact-box .email {
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

/* ---------- Calculator building blocks (used by tool pages) ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-dark); color: #fff; }

.result {
  margin-top: 20px;
  background: #fff;
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 20px;
}

.result .big {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.result .label {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Tool pages ---------- */
.tool-page { padding: 24px 0 56px; }

.tool-page .container { max-width: 760px; }

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.tool-page h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

@media (min-width: 760px) {
  .tool-page h1 { font-size: 38px; }
}

.tool-intro {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 24px;
}

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.hint {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.45;
}

/* Shape picker (large tap targets) */
.shape-picker {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .shape-picker { grid-template-columns: repeat(3, 1fr); }
}

.field .shape-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 400;
}

.field .shape-option input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 20px;
  accent-color: var(--success);
}

.shape-option strong { display: block; font-size: 16px; }
.shape-option small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }

.shape-option:has(input:checked) {
  border-color: var(--success);
  background: var(--success-soft);
}

/* Feet + inches pair, and inputs with a unit label */
.ft-in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field .ft-in label,
.unit-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.ft-in input,
.unit-input input { flex: 1 1 auto; min-width: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Results */
.result-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.result-heading {
  font-size: 18px;
  margin: 20px 0 8px;
}

.result-table,
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.result-table th,
.result-table td,
.info-table th,
.info-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--surface-2);
}

.result-table th,
.info-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.result-table td.num {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-table th:not(:first-child) { text-align: right; }

.result-tip {
  margin: 12px 0 0;
  font-size: 15px;
}

.result-tip:empty { display: none; }

.prices { margin-top: 16px; }

.prices summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-dark);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  margin-top: 12px;
}

/* Article content under a calculator */
.tool-content { margin-top: 8px; }

.tool-content h2 { font-size: 22px; margin: 32px 0 8px; }
.tool-content h3 { font-size: 18px; margin: 20px 0 4px; }
.tool-content p,
.tool-content li { color: #33373b; }
.tool-content ol { padding-left: 22px; }
.tool-content li { margin-bottom: 6px; }

/* Homepage card for a live tool */
.badge.live {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* Ad slot placeholder (filled once AdSense is approved) */
.ad-slot {
  margin: 28px 0;
  min-height: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 15px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover { color: var(--accent); }

/* Link that looks like plain text (e.g. Cool Apps LLC) */
a.plain-link,
a.plain-link:hover,
a.plain-link:visited {
  color: var(--text);
  text-decoration: none;
}

.disclaimer {
  font-size: 13px;
  margin: 12px 0 0;
}
