/* ============================================
   The Free Invoice — styles.css
   Dark brutalist. Linear/Vercel-inspired.
   ============================================ */

/* ── Reset ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

/* ── Base ─────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f0f0f0;
}

p {
  color: #888;
  line-height: 1.65;
}

a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.12s;
}

a:hover { color: #60a5fa; }

/* ── Navbar ───────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
  padding: 0 32px;
  height: 52px;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-image {
  height: 26px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links a {
  color: #666;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}

.nav-links a:hover {
  color: #e8e8e8;
  background: #141414;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #888;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #0d0d0d;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    padding: 8px 0 12px;
    border-bottom: 1px solid #1a1a1a;
    z-index: 99;
  }

  .nav-links a {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 0;
  }

  .nav-links.active { display: flex; }
}

/* ── Footer ───────────────────────────────── */
.site-footer {
  background: #000;
  border-top: 1px solid #1a1a1a;
  padding: 28px 32px;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #444;
  font-size: 0.8rem;
  transition: color 0.12s;
}

.site-footer a:hover { color: #888; }

.footer-copy {
  color: #333;
  font-size: 0.78rem;
}

/* ── Form Elements ────────────────────────── */
label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 8px 10px;
  border: 1px solid #262626;
  border-radius: 3px;
  outline: none;
  background: #141414;
  color: #e8e8e8;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
  display: block;
  letter-spacing: -0.01em;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #3a3a3a;
}

textarea {
  min-height: 58px;
  resize: vertical;
  line-height: 1.45;
}

input[type="file"] {
  padding: 7px 10px;
  cursor: pointer;
  color: #555;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* colorize date input icon on webkit */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.4);
  cursor: pointer;
}

.form-row { margin-bottom: 10px; }

.form-section-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  margin: 18px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}

.price-row {
  display: flex;
  gap: 8px;
}

.price-row select { flex: 0 0 110px; }
.price-row input  { flex: 1; }

/* ── Line item column header ──────────────── */
.li-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #3a3a3a;
  padding: 0 0 5px;
  margin-bottom: 4px;
  border-bottom: 1px solid #1a1a1a;
}

/* ── Each line item row ───────────────────── */
.line-item-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.line-item-row .li-desc {
  flex: 1;
  min-width: 0;
}

.line-item-row .li-price {
  flex: 0 0 90px;
}

.line-item-row .li-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 32px;
  padding: 0;
  margin-top: 0;
  background: none;
  border: 1px solid #222;
  border-radius: 3px;
  color: #444;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  box-shadow: none;
}

.line-item-row .li-remove:hover {
  border-color: #555;
  color: #aaa;
  background: none;
  transform: none;
}

/* ── Add line item button ─────────────────── */
.btn-add-item {
  width: 100%;
  padding: 8px;
  margin-top: 2px;
  margin-bottom: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: #444;
  background: none;
  border: 1px dashed #262626;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  box-shadow: none;
  letter-spacing: 0.02em;
}

.btn-add-item:hover {
  border-color: #3a3a3a;
  color: #777;
  background: none;
  transform: none;
}

/* ── CTA Button ───────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  margin-top: 14px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6), 0 4px 16px rgba(59, 130, 246, 0.25);
}

.btn-primary:active {
  background: #1d4ed8;
  box-shadow: none;
}

/* ── Index: Two-Column Layout ─────────────── */
.content-wrapper {
  display: flex;
  flex: 1;
  align-items: stretch;
}

.left-column {
  flex: 1;
  padding: 56px 48px 56px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ── Hero type system (8px grid) ─────────── */

/* Small all-caps label above headline */
.hero-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 24px; /* 3 × 8 */
}

/* ── Hero: editorial stacked headline ────────
   hero-block = flex row: headline (flex:1) + index column
   ─────────────────────────────────────────── */

.hero-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

/* h1 reset — children set their own sizes */
.hero-headline {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}

/* Shared display type rules */
.hl-solid,
.hl-outline,
.hl-blue {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(90px, 13vw, 190px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* Line 1 — solid white */
.hl-solid {
  color: #f5f5f5;
}

/* Line 2 — outline only, no fill */
.hl-outline {
  color: transparent;
  -webkit-text-stroke: 2.5px #5a5a5a;
  text-stroke: 2.5px #5a5a5a;
}

/* Line 3 — solid blue punchline */
.hl-blue {
  color: #2563eb;
}

/* Index number column */
.hero-index {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #333;
  line-height: 1.7;
  padding-top: 3px; /* align cap-height of first number with headline */
  flex-shrink: 0;
}

/* One-line factual subtext */
.hero-intro {
  font-size: 16px;
  font-weight: 400;
  color: #777;
  letter-spacing: 0;
  line-height: 1;
  margin-top: 32px;
  margin-bottom: 24px;
}

.faq-cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: #3b82f6;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.12s, gap 0.15s;
}

.faq-cta:hover {
  color: #60a5fa;
  gap: 8px;
}

/* ── Load animations ──────────────────────── */
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: translateX(0);     }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hl-solid   { animation: heroSlideIn 0.5s ease both; animation-delay: 0.05s; }
.hl-outline { animation: heroSlideIn 0.5s ease both; animation-delay: 0.18s; }
.hl-blue    { animation: heroSlideIn 0.5s ease both; animation-delay: 0.31s; }

.hero-intro,
.hero-index { animation: heroFadeIn 0.5s ease both; animation-delay: 0.45s; }

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hl-solid, .hl-outline, .hl-blue,
  .hero-intro, .hero-index {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Hide index column on mobile */
@media (max-width: 768px) {
  .hero-index { display: none; }
}

/* dead classes from previous iterations */
.hero-eyebrow { display: none; }
.tips-list    { display: none; }

.right-column {
  flex: 0 0 480px;
  padding: 40px 56px 40px 40px;
  border-left: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.form-header {
  margin-bottom: 16px;
}

.form-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e8e8e8;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.form-header p {
  font-size: 0.78rem;
  color: #444;
}

.right-column form {
  width: 100%;
}

@media (max-width: 960px) {
  .content-wrapper { flex-direction: column; }

  .left-column {
    padding: 40px 28px 28px;
  }

  .hero-intro { max-width: 100%; }

  .right-column {
    flex: none;
    border-left: none;
    border-top: 1px solid #1a1a1a;
    padding: 32px 28px 48px;
  }
}

/* ── Blog List ────────────────────────────── */
.blog-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 0;
  flex: 1;
}

.blog-page-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1a1a1a;
}

.blog-page-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.blog-page-header p {
  font-size: 0.875rem;
  color: #555;
}

.post-card {
  padding: 24px 0;
  border-bottom: 1px solid #1a1a1a;
  transition: border-color 0.15s;
}

.post-card:last-child { border-bottom: none; }

.post-card:hover { border-color: #262626; }

.post-card h2 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #e8e8e8;
  letter-spacing: -0.02em;
  font-weight: 600;
  transition: color 0.12s;
}

.post-card:hover h2 { color: #fff; }

.post-card p {
  margin-bottom: 10px;
  color: #555;
  font-size: 0.875rem;
  line-height: 1.6;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #3b82f6;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0;
  transition: gap 0.15s, color 0.12s;
}

.read-more:hover {
  gap: 8px;
  color: #60a5fa;
}

/* ── Blog Post ────────────────────────────── */
.blog-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 0;
  flex: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 36px;
  transition: color 0.12s;
}

.back-link:hover { color: #888; }

.blog-content h1 {
  font-size: 1.8rem;
  margin-bottom: 32px;
  line-height: 1.15;
  color: #f0f0f0;
}

.blog-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 32px 0 10px;
  color: #e8e8e8;
  letter-spacing: -0.02em;
}

.blog-content p {
  margin-bottom: 16px;
  font-size: 0.925rem;
  line-height: 1.75;
  color: #777;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 16px 20px;
  color: #777;
  line-height: 1.7;
  font-size: 0.925rem;
}

.blog-content li { margin-bottom: 5px; }

.blog-content strong { color: #c8c8c8; font-weight: 600; }

/* ── FAQ ──────────────────────────────────── */
.faq-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 0;
  flex: 1;
}

.faq-page-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1a1a1a;
}

.faq-page-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.faq-page-header p {
  font-size: 0.875rem;
  color: #555;
}

.faq-list { margin-bottom: 40px; }

.faq-item { border-bottom: 1px solid #1a1a1a; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c0c0c0;
  text-align: left;
  gap: 16px;
  transition: color 0.12s;
  letter-spacing: -0.01em;
}

.faq-question:hover { color: #f0f0f0; }

.faq-icon {
  font-size: 1.2rem;
  font-weight: 300;
  color: #333;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.22s ease, color 0.12s;
}

.faq-item.open .faq-question { color: #f0f0f0; }
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: #3b82f6;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.faq-item.open .faq-answer { grid-template-rows: 1fr; }

.faq-answer-inner { overflow: hidden; }

.faq-answer-inner p {
  padding: 0 0 18px;
  color: #666;
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 0;
}

.faq-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.12s;
}

.faq-back-link:hover { color: #888; }

/* ── Content / Privacy ────────────────────── */
.content-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 0;
  flex: 1;
}

.content-page h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.content-page .meta {
  color: #444;
  font-size: 0.8rem;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1a1a1a;
  display: block;
}

.content-page h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 28px 0 8px;
  color: #c8c8c8;
}

.content-page p {
  color: #666;
  margin-bottom: 12px;
  line-height: 1.75;
  font-size: 0.9rem;
}

.content-page ul {
  margin: 0 0 14px 20px;
  color: #666;
  line-height: 1.7;
  font-size: 0.9rem;
}

.content-page li { margin-bottom: 4px; }

.content-page a {
  color: #3b82f6;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
}

.content-page a:hover {
  color: #60a5fa;
  text-decoration-color: rgba(96, 165, 250, 0.5);
}

.content-page strong { color: #c0c0c0; }
