/* ═══════════════════════════════════════════
   CalcNova v2  –  Light Theme  –  2026
═══════════════════════════════════════════ */

/* ── Variables ─────────────────────────── */
:root {
  --bg:        #f8f7f4;
  --bg2:       #ffffff;
  --bg3:       #f0ede8;
  --surface:   #ffffff;
  --border:    #e5e1da;
  --border2:   #d4cfc7;
  --accent:    #16a34a;
  --accent-d:  #15803d;
  --accent2:   #1d4ed8;
  --accent3:   #b45309;
  --text:      #1c1917;
  --text2:     #44403c;
  --muted:     #78716c;
  --muted2:    #a8a29e;
  --danger:    #dc2626;
  --success:   #16a34a;
  --f-head:    'Plus Jakarta Sans', sans-serif;
  --f-body:    'Inter', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;
  --r:         10px;
  --r-lg:      16px;
  --r-xl:      24px;
  --shadow:    0 1px 12px rgba(28,25,23,.07);
  --shadow-lg: 0 4px 32px rgba(28,25,23,.11);
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--f-body);
  font-size: 16px; line-height: 1.65; min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--f-body); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }

/* ── Typography ────────────────────────── */
h1,h2,h3,h4 { font-family: var(--f-head); line-height: 1.15; letter-spacing: -.025em; color: var(--text); }

/* ── Skip link (a11y) ──────────────────── */
.skip-link { position: absolute; top: -40px; left: 16px; background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: var(--r); font-weight: 600; z-index: 9999; transition: top .2s; }
.skip-link:focus { top: 8px; }

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.nav-wrap {
  max-width: 1160px; margin: 0 auto;
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--f-head); font-size: 1.35rem; font-weight: 800;
  color: var(--text); display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0;
}
.logo-mark {
  width: 32px; height: 32px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem; font-weight: 800; letter-spacing: -.02em;
}
.logo-text em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--muted); font-size: .875rem; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; transition: all .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--text); background: var(--bg3); text-decoration: none;
}
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 6px; border-radius: 8px;
}
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; display: block; transition: .25s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 68px 20px 52px;
  max-width: 760px; margin: 0 auto;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.25);
  color: var(--accent); font-size: .75rem; font-family: var(--f-mono);
  font-weight: 500; padding: 4px 13px; border-radius: 100px;
  margin-bottom: 20px; letter-spacing: .06em;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.1; margin-bottom: 18px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-lead {
  color: var(--muted); font-size: 1.08rem; max-width: 520px;
  margin: 0 auto 32px; line-height: 1.72;
}
.search-wrap {
  display: flex; max-width: 460px; margin: 0 auto;
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .2s;
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap input {
  flex: 1; border: none; outline: none;
  padding: 13px 18px; font-family: var(--f-body); font-size: .93rem;
  background: transparent; color: var(--text);
}
.search-wrap input::placeholder { color: var(--muted2); }
.search-wrap button {
  background: var(--accent); color: #fff; border: none;
  padding: 13px 20px; font-weight: 600; font-size: .88rem;
  transition: background .18s; white-space: nowrap;
}
.search-wrap button:hover { background: var(--accent-d); }

/* ═══════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }
.divider { height: 1px; background: var(--border); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ═══════════════════════════════════════
   SECTION LABELS + HEADINGS
═══════════════════════════════════════ */
.label {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 12px; }
.section-lead { color: var(--muted); font-size: 1rem; max-width: 560px; line-height: 1.72; margin-bottom: 36px; }

/* ═══════════════════════════════════════
   CALCULATOR CARDS (Homepage grid)
═══════════════════════════════════════ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.calc-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.calc-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow-lg);
  transform: translateY(-3px); text-decoration: none;
}
.calc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.calc-card h3 { font-family: var(--f-head); font-size: .97rem; font-weight: 700; line-height: 1.3; }
.calc-card p { font-size: .8rem; color: var(--muted); line-height: 1.5; flex: 1; }
.card-arrow { font-size: .78rem; font-weight: 700; color: var(--accent); }

/* ═══════════════════════════════════════
   FEATURE CARDS
═══════════════════════════════════════ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.feat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 14px; }
.feature-card h3 { font-family: var(--f-head); font-size: .97rem; font-weight: 700; margin-bottom: 7px; }
.feature-card p { font-size: .87rem; color: var(--muted); line-height: 1.6; }

/* ═══════════════════════════════════════
   CALCULATOR PAGE LAYOUT
═══════════════════════════════════════ */
.calc-page { max-width: 800px; margin: 0 auto; padding: 48px 20px 80px; }

/* breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted); margin-bottom: 26px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb span { color: var(--muted); }

/* page hero */
.page-h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.12; margin-bottom: 10px;
}
.page-intro { color: var(--muted); font-size: 1.03rem; line-height: 1.72; margin-bottom: 36px; max-width: 660px; }

/* ═══════════════════════════════════════
   TOOL BOX
═══════════════════════════════════════ */
.tool-box {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 44px;
}
.tool-head {
  background: var(--bg3); border-bottom: 1px solid var(--border);
  padding: 14px 22px; display: flex; align-items: center; gap: 10px;
}
.tool-head h2 { font-family: var(--f-head); font-size: 1rem; font-weight: 700; margin: 0; }
.tool-body { padding: 26px 24px; }

/* form elements */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.form-row input, .form-row select {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); color: var(--text); font-family: var(--f-body);
  font-size: .93rem; padding: 10px 13px; outline: none;
  transition: border-color .18s;
  -webkit-appearance: none; appearance: none;
}
.form-row input:focus, .form-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.form-row select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2378716c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* unit toggle */
.unit-toggle { display: flex; gap: 6px; margin-bottom: 18px; }
.unit-btn {
  flex: 1; background: var(--bg3); border: 1.5px solid var(--border);
  color: var(--muted); font-size: .85rem; font-weight: 600;
  padding: 9px 12px; border-radius: var(--r); transition: all .18s;
}
.unit-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* calc button */
.calc-btn {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--r); padding: 12px 28px;
  font-size: .93rem; font-weight: 700; font-family: var(--f-head);
  letter-spacing: -.01em; transition: background .18s, transform .18s;
  margin-top: 4px;
}
.calc-btn:hover { background: var(--accent-d); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }
.calc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* result */
.result-box {
  background: linear-gradient(135deg, rgba(22,163,74,.06), rgba(29,78,216,.05));
  border: 1.5px solid rgba(22,163,74,.22); border-radius: var(--r-lg);
  padding: 20px 22px; margin-top: 18px; display: none;
}
.result-box.show { display: block; animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.result-item { }
.r-label { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.r-val { font-family: var(--f-head); font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.r-val.sm { font-size: 1.35rem; }
.r-sub { font-size: .82rem; color: var(--muted); margin-top: 3px; }

/* progress bar */
.prog-wrap { margin-top: 14px; }
.prog-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.prog-bar { height: 8px; border-radius: 8px; background: var(--bg3); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .5s ease; }

/* ═══════════════════════════════════════
   INFO CONTENT SECTIONS
═══════════════════════════════════════ */
.info { margin-bottom: 34px; }
.info h2 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 10px;
  padding-bottom: 9px; border-bottom: 2px solid var(--border);
}
.info h3 { font-size: 1.02rem; font-weight: 700; margin: 16px 0 6px; color: var(--text2); }
.info p { color: var(--text2); line-height: 1.78; margin-bottom: 10px; font-size: .96rem; }
.info ul, .info ol { color: var(--text2); font-size: .96rem; line-height: 1.78; margin-bottom: 10px; }
.info strong { color: var(--text); }

/* formula box */
.formula {
  background: var(--bg3); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px;
  font-family: var(--f-mono); font-size: .87rem; color: var(--text);
  line-height: 1.7; margin: 12px 0;
}

/* table */
.tbl-wrap { overflow-x: auto; margin: 12px 0; border-radius: var(--r); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th { background: var(--bg3); padding: 10px 14px; text-align: left; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--border); }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg3); }

/* steps */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; gap: 14px;
  align-items: flex-start; margin-bottom: 14px;
}
.steps li::before {
  content: counter(step); flex-shrink: 0;
  width: 26px; height: 26px; background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; margin-top: 1px;
}
.steps li span { color: var(--text2); font-size: .95rem; line-height: 1.65; }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-btn {
  width: 100%; background: none; border: none; text-align: left;
  padding: 17px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  color: var(--text); font-family: var(--f-body); font-size: .95rem; font-weight: 600;
  cursor: pointer;
}
.faq-btn:hover { color: var(--accent); }
.faq-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-icon { font-size: 1.1rem; color: var(--muted); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-ans { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; }
.faq-item.open .faq-ans { max-height: 400px; padding-bottom: 16px; }
.faq-ans p { color: var(--text2); font-size: .92rem; line-height: 1.75; margin: 0; }

/* related */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.related-link {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 16px; text-decoration: none; color: var(--text);
  font-size: .87rem; font-weight: 600; display: flex; align-items: center; gap: 9px;
  transition: border-color .18s, color .18s;
}
.related-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ═══════════════════════════════════════
   INNER PAGES (About / Privacy)
═══════════════════════════════════════ */
.inner-page { max-width: 760px; margin: 0 auto; padding: 56px 20px 90px; }
.inner-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.inner-page .meta { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); margin-bottom: 34px; }
.inner-page h2 { font-family: var(--f-head); font-size: 1.2rem; font-weight: 700; margin: 28px 0 9px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.inner-page p { color: var(--text2); line-height: 1.8; margin-bottom: 12px; font-size: .96rem; }
.inner-page ul { color: var(--text2); font-size: .96rem; line-height: 1.8; margin-bottom: 12px; }
.page-divider { height: 1px; background: var(--border); margin: 32px 0; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 24px 0; }
.about-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; text-align: center; }
.about-stat .big { font-family: var(--f-head); font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.about-stat small { font-size: .8rem; color: var(--muted); }

/* contact form */
.contact-form { margin-top: 28px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--r); color: var(--text); font-family: var(--f-body);
  font-size: .93rem; padding: 11px 15px; outline: none; transition: border-color .18s, box-shadow .18s;
  margin-bottom: 14px;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.contact-form label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.form-group { margin-bottom: 4px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.submit-btn { background: var(--accent); color: #fff; border: none; border-radius: var(--r); padding: 12px 32px; font-size: .95rem; font-weight: 700; font-family: var(--f-head); transition: background .18s, transform .18s; }
.submit-btn:hover { background: var(--accent-d); transform: translateY(-1px); }
.form-ok { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.3); color: var(--accent); padding: 13px 18px; border-radius: var(--r); margin-top: 14px; display: none; font-size: .92rem; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 48px 20px 28px;
}
.footer-inner { max-width: 1160px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 36px;
}
.footer-brand p { color: var(--muted); font-size: .87rem; line-height: 1.65; margin-top: 10px; max-width: 240px; }
.footer-col h3 { font-family: var(--f-head); font-size: .88rem; font-weight: 700; margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 7px; transition: color .15s; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { color: var(--muted); font-size: .79rem; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 2px; box-shadow: var(--shadow-lg); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .form-grid, .form-2col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero { padding: 48px 16px 40px; }
  .calc-page { padding: 36px 16px 64px; }
  .tool-body { padding: 20px 16px; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
}
