/* SimpleDIYLife — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #1A1D1A;
  --ink-soft: #565B56;
  --paper: #F7F5F0;
  --paper-dim: #EFEBE2;
  --card: #FFFFFF;
  --orange: #FF6B35;
  --orange-dark: #DD5424;
  --orange-tint: #FFE8DC;
  --pine: #2F6F5E;
  --pine-tint: #E1EFE9;
  --line: #DEDACE;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26,29,26,0.04), 0 6px 20px rgba(26,29,26,0.06);
  --shadow-lg: 0 4px 10px rgba(26,29,26,0.06), 0 18px 40px rgba(26,29,26,0.10);

  /* Back-compat aliases (used in inline styles across content pages) */
  --primary: var(--orange-dark);
  --primary-dark: var(--orange-dark);
  --primary-light: var(--orange-tint);
  --accent: var(--orange);
  --accent-2: var(--pine);
  --gold: var(--orange-dark);
  --text: var(--ink);
  --text-muted: var(--ink-soft);
  --border: var(--line);
  --bg: var(--paper);
  --bg-gray: var(--paper-dim);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }

::selection { background: var(--orange-tint); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ─── NAV ─── */
nav {
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo .mark {
  display: inline-flex;
  width: 26px; height: 26px;
  background: var(--orange);
  color: var(--paper);
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  transform: rotate(-6deg);
}
.logo .simple { color: var(--ink); }
.logo .diylife { color: var(--orange-dark); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 7px 16px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--orange-tint); color: var(--orange-dark); }
.nav-links a.active { background: var(--ink); color: var(--paper); }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

/* ─── HERO ─── */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 76px 24px 68px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247,245,240,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,245,240,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,53,0.16);
  color: var(--orange);
  border: 1px solid rgba(255,107,53,0.35);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 22px;
  position: relative;
}
.hero h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -1px;
  line-height: 1.15;
  position: relative;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p {
  font-size: 1.05rem;
  color: #C9CCC6;
  max-width: 540px;
  margin: 0 auto 32px;
  position: relative;
}
.search-bar {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(0,0,0,0.35);
  position: relative;
}
.search-bar input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--ink);
  font-family: inherit;
  background: transparent;
}
.search-bar button {
  background: var(--orange);
  border: none;
  padding: 15px 26px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s;
  letter-spacing: 0.2px;
}
.search-bar button:hover { background: #ff7c4d; }

/* ─── CONTAINER ─── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ─── SECTION ─── */
.section { padding: 64px 0; }
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.section-sub { color: var(--ink-soft); margin-bottom: 36px; font-size: 0.95rem; max-width: 560px; }

/* ─── TOOLS GRID ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.tool-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: all 0.18s;
  cursor: pointer;
  display: block;
  position: relative;
}
.tool-card::before, .tool-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--orange);
  opacity: 0;
  transition: opacity 0.18s;
}
.tool-card::before { top: 7px; left: 7px; border-right: none; border-bottom: none; }
.tool-card::after { bottom: 7px; right: 7px; border-left: none; border-top: none; }
.tool-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card:hover::before, .tool-card:hover::after { opacity: 1; }
.tool-icon {
  font-size: 1.9rem;
  margin-bottom: 12px;
  display: block;
}
.tool-card h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.tool-card p { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.55; }
.tool-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-text  { background: #FEF3C7; color: #92400E; }
.badge-calc  { background: #DBEAFE; color: #1D4ED8; }
.badge-gen   { background: var(--pine-tint); color: var(--pine); }
.badge-conv  { background: #F3E8FF; color: #7E22CE; }
.badge-util  { background: var(--orange-tint); color: var(--orange-dark); }

/* ─── CATEGORY TABS ─── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tab-btn {
  padding: 8px 18px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.15s;
  font-family: inherit;
}
.tab-btn:hover, .tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ─── TOOL PAGE ─── */
.tool-page { padding: 40px 0 64px; }
.breadcrumb { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 20px; }
.breadcrumb span { margin: 0 6px; }
.tool-header { margin-bottom: 32px; }
.tool-header h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.tool-header p { color: var(--ink-soft); font-size: 1rem; }

.tool-box {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.tool-box label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.tool-box textarea, .tool-box input[type="text"], .tool-box input[type="number"], .tool-box select, .tool-box input[type="date"] {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s;
}
.tool-box textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.tool-box textarea:focus, .tool-box input:focus, .tool-box select:focus { outline: none; border-color: var(--orange); }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.field-row > div { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #ff7c4d; transform: translateY(-1px); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-accent { background: var(--pine); color: white; }
.btn-accent:hover { background: #285c4e; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }

/* ─── RESULT BOX ─── */
.result-box {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  font-family: 'Inter', monospace;
  font-size: 0.9rem;
  min-height: 64px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

/* ─── STATS ─── */
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.stat-chip {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  min-width: 96px;
  flex: 1;
}
.stat-chip .num { font-size: 1.5rem; font-weight: 700; color: var(--orange-dark); font-family: 'Space Grotesk', sans-serif; }
.stat-chip .lbl { font-size: 0.7rem; color: var(--ink-soft); margin-top: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── INFO BOX ─── */
.info-box {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--pine);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
}
.info-box h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.info-box p, .info-box li { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.8; }
.info-box ol, .info-box ul { padding-left: 18px; }

/* ─── WHY SECTION ─── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 12px;
}
.why-card {
  padding: 26px 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  text-align: center;
  transition: border-color 0.18s;
}
.why-card:hover { border-color: var(--ink); }
.why-icon { font-size: 2rem; margin-bottom: 12px; }
.why-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; font-weight: 700; margin-bottom: 7px; }
.why-card p { font-size: 0.82rem; color: var(--ink-soft); }

/* ─── BLOG ─── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.blog-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.18s;
  background: var(--card);
  display: block;
  color: inherit;
}
.blog-card:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; }
.blog-thumb {
  height: 160px;
  background: var(--paper-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  position: relative;
}
.blog-thumb-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-body { padding: 20px; }
.blog-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
  line-height: 1.4;
}
.blog-body p { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.6; }
.blog-meta { font-size: 0.75rem; color: var(--ink-soft); margin-top: 14px; display: flex; gap: 12px; }

/* ─── ARTICLE PAGE ─── */
.article-header { padding: 52px 0 30px; border-bottom: 1.5px solid var(--ink); margin-bottom: 40px; }
.article-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-soft); }
.article-content { max-width: 720px; }
.article-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 34px 0 14px;
  color: var(--ink);
}
.article-content p { font-size: 0.95rem; line-height: 1.85; color: var(--ink-soft); margin-bottom: 18px; }
.article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 18px; }
.article-content li { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.8; margin-bottom: 6px; }
.article-content strong { color: var(--ink); }

/* ─── LEGAL ─── */
.legal-content { max-width: 800px; padding: 52px 0 72px; }
.legal-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.legal-meta { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 44px; padding-bottom: 22px; border-bottom: 1.5px solid var(--line); }
.legal-section { margin-bottom: 34px; }
.legal-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-section h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 5px;
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
}
.legal-section p { color: var(--ink-soft); line-height: 1.85; font-size: 0.9rem; margin-bottom: 10px; }
.legal-section a { color: var(--orange-dark); font-weight: 600; }
.legal-highlight {
  background: var(--orange-tint);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.7;
  border-left: 3px solid var(--orange);
}

/* ─── FOOTER ─── */
footer {
  background: var(--ink);
  color: #A7ACA4;
  padding: 52px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: var(--paper); font-size: 1.2rem; }
.footer-brand .simple { color: var(--paper); }
.footer-brand .diylife { color: var(--orange); }
.footer-brand p { margin-top: 14px; font-size: 0.85rem; line-height: 1.75; }
footer h4 { color: var(--paper); font-size: 0.82rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 9px; }
footer ul li a { color: #A7ACA4; font-size: 0.85rem; transition: color 0.15s; }
footer ul li a:hover { color: var(--orange); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #33372F;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #A7ACA4; }
.footer-bottom a:hover { color: var(--orange); }

/* ─── AD SLOT ─── */
.ad-slot {
  background: var(--paper-dim);
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  padding: 20px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  margin: 26px 0;
}

/* ─── UTILS ─── */
.bg-gray { background: var(--paper-dim); }
.bg-dark { background: var(--ink); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.divider { height: 1.5px; background: var(--line); margin: 32px 0; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.tool-card { animation: fadeUp 0.3s ease both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--paper); border-bottom: 1.5px solid var(--ink); padding: 14px 24px; gap: 4px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .stats-row { gap: 10px; }
  .hero { padding: 52px 20px 48px; }
  .tool-box { padding: 22px; }
  .field-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
