/*
Theme Name: InstantCV
Theme URI: https://instantcv.site/
Author: Muhammad Ali
Author URI: https://instantcv.site/
Description: Premium editorial theme for the InstantCV free resume builder — warm paper, ink navy and amber, Fraunces display type with Inter body. Includes the browser-based CV builder (no signup, no uploads, no AI) with 20 themes, live A4 preview, ATS scoring and PDF/DOCX export.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: instantcv
*/

/* ============ tokens ============ */
:root {
  --paper: #faf7f1;
  --paper-deep: #f3eee3;
  --ink: #0f2540;
  --ink-soft: rgba(15, 37, 64, 0.72);
  --ink-faint: rgba(15, 37, 64, 0.55);
  --accent: #a65c28;
  --accent-deep: #8f4e22;
  --accent-soft: #c49a6c;
  --card: #ffffff;
  --line: rgba(15, 37, 64, 0.12);
  --radius: 16px;
  --shadow: 0 12px 34px rgba(15, 37, 64, 0.09);
  --shadow-sm: 0 4px 14px rgba(15, 37, 64, 0.07);
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1600px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-name { font: 600 20px var(--font-display); letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--accent); background: rgba(166, 92, 40, 0.08); }
.main-nav a.current { color: var(--accent); font-weight: 700; background: rgba(166, 92, 40, 0.1); }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 10px; background: none; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .18s ease, opacity .18s ease; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 720px) {
  .main-nav a { padding: 8px 8px; font-size: 13px; }
  .brand-name { font-size: 17px; }
}
@media (max-width: 760px) {
  .site-header .wrap { position: relative; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 2px; flex-wrap: nowrap;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(15, 37, 64, .12);
    padding: 10px 16px 14px;
  }
  .site-header.nav-open .main-nav { display: flex; }
  .main-nav a { padding: 11px 12px; font-size: 15px; border-radius: 10px; }
}

/* ============ hero ============ */
.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(166, 92, 40, 0.1), transparent 70%);
  padding: 56px 0 48px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); margin: 0 0 14px; max-width: 20ch; }
.hero .lede { font-size: clamp(15px, 1.8vw, 18px); color: var(--ink-soft); max-width: 62ch; margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hero-points li {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px;
}
.hero-points li svg, .hero-points li .dot { color: var(--accent); }

/* ============ buttons (site) ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 600 15px/1.2 var(--font-body); padding: 13px 26px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(166, 92, 40, 0.3); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); color: #fff; }
.btn-outline { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ============ builder layout (front page) ============ */
.builder-section { padding: 36px 0 8px; }
.builder-head { max-width: 720px; margin-bottom: 20px; }
.builder-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.builder-head p { color: var(--ink-soft); margin: 0; }
.builder-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
@media (min-width: 1024px) {
  .builder-grid { grid-template-columns: minmax(380px, 470px) 1fr; }
}
.builder-form-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.builder-preview-col { min-width: 0; }
@media (min-width: 1024px) {
  .builder-preview-col > .sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
}
.builder-side-row { display: grid; gap: 14px; }
@media (min-width: 1024px) { .builder-side-row { grid-template-columns: 1fr auto; align-items: start; } }

/* ============ landing sections ============ */
.landing { padding: 56px 0 72px; }
.landing .narrow { max-width: 800px; }
.landing section { margin-bottom: 64px; }
.landing h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; }
.landing .section-lede { color: var(--ink-soft); margin: 0 0 20px; }
.landing .section-lede strong { color: var(--ink); }
.card-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .card-grid.two { grid-template-columns: 1fr 1fr; } }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 18px; margin: 0 0 8px; }
.info-card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.compare-table { min-width: 560px; border: none; border-radius: 0; box-shadow: none; }
.compare-table th, .compare-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font-family: var(--font-display); font-size: 15px; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody th { font-weight: 600; }
.compare-table td { color: var(--ink-soft); }
.final-cta {
  border: 1px solid rgba(166, 92, 40, 0.3); border-radius: 22px;
  background: linear-gradient(135deg, rgba(166, 92, 40, 0.12), transparent 65%);
  padding: 36px; margin-top: 8px;
}
.final-cta .kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.final-cta h2 { margin: 10px 0; }
.final-cta p { color: var(--ink-soft); margin: 0 0 20px; }
.final-cta .row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 10px; margin-top: 18px; }
.faq-list details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; box-shadow: var(--shadow-sm); }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; }

/* ============ footer ============ */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; }
.site-footer .cols { display: grid; gap: 32px; padding: 44px 0 8px; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.site-footer .brand-blurb { font-size: 14px; color: var(--ink-soft); margin: 12px 0; max-width: 34ch; }
.site-footer h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-family: var(--font-body); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer ul a { text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.site-footer ul a:hover { color: var(--accent); }
.site-footer .legal { padding: 20px 0 28px; font-size: 13.5px; color: var(--ink-faint); border-top: 1px solid var(--line); margin-top: 28px; }

/* ============ generic pages / guides ============ */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; max-width: 22ch; }
.page-head .lede { color: var(--ink-soft); max-width: 64ch; margin: 0; font-size: 17px; }
.page-body { padding: 24px 0 64px; }
.prose { max-width: 760px; }
.prose p, .prose li { font-size: 16px; color: var(--ink-soft); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.8em; }
.prose a { text-underline-offset: 3px; }
.guide-list { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 640px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; display: block; transition: transform .14s ease, box-shadow .14s ease; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.guide-card h2 { font-size: 19px; margin: 0 0 8px; color: var(--ink); }
.guide-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.guide-meta { font-size: 13px; color: var(--ink-faint); margin-bottom: 18px; }
.breadcrumbs { font-size: 13px; color: var(--ink-faint); margin-bottom: 10px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* ============ tool page intro ============ */
.tool-intro { max-width: 760px; margin-bottom: 24px; }
.tool-intro p { color: var(--ink-soft); }

/* ============ responsive polish ============ */
@media (max-width: 640px) {
  .hero { padding: 36px 0 32px; }
  .final-cta { padding: 24px; }
  .builder-section { padding-top: 24px; }
}
