/* =========================================================
   Piedmondo — base styles
   Theme: Minimal & Elegant (Sample 4)
   Fraunces serif headings + Inter body, black & white.
   ========================================================= */

:root {
  --bg: #fafafa;
  --bg-muted: #f2f2f0;
  --bg-accent: #111111;   /* black band */
  --fg: #111111;
  --fg-on-accent: #fafafa;
  --muted: #6b6b6b;
  --accent: #111111;      /* near-black "accent" — buttons, links */
  --accent-hover: #333333;
  --border: #e5e5e5;
  --radius: 4px;
  --max-width: 1040px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

/* ---------- Dark mode (color inversion) ----------
   The site is purely black & white, so a filter inversion gives a clean,
   complete dark theme without re-declaring every color. Photographic
   screenshots are inverted back so they don't render as negatives. */
html[data-theme="dark"] { filter: invert(1) hue-rotate(180deg); }
html[data-theme="dark"] .project-thumb img { filter: invert(1) hue-rotate(180deg); }

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: #cfcfcf; color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 100%;
  margin: 0;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { background: var(--bg-muted); transform: translateY(-1px); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.brand-mark { width: 1.55em; height: 1.55em; display: block; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a { color: var(--fg); font-weight: 500; font-size: 0.92rem; }
.nav-links a:hover { color: var(--muted); text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 7rem 0 4.5rem;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 2.2rem;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
/* Offset anchor jumps so headings aren't hidden under the sticky header */
section[id] { scroll-margin-top: 84px; }
.section-muted { background: var(--bg-muted); }
.section-accent { background: var(--bg-accent); color: var(--fg-on-accent); }
.section-accent h2 { color: var(--fg-on-accent); }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem;
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: 0.6rem;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Grid + cards ---------- */
.grid { display: grid; gap: 2.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: transparent;
  padding: 0;
}
.card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); }

/* Cards inside muted/accent sections get a subtle surface */
.section-muted .card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

/* Project cards with a screenshot banner */
.project-thumb {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.1rem;
  background: var(--bg-muted);
  aspect-ratio: 16 / 9;
}
.project-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
a.project-thumb:hover img { transform: scale(1.03); }

.badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.project-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}
.project-link:hover { text-decoration: none; color: var(--muted); }

/* ---------- How it works (steps) ---------- */
.steps { list-style: none; }
.step { position: relative; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ---------- Pricing ---------- */
.pricing { align-items: stretch; }
.price-card {
  display: flex;
  flex-direction: column;
  background: var(--bg) !important;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.75rem !important;
  box-shadow: var(--shadow);
  position: relative;
}
.price-card.featured {
  border-color: var(--fg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}
.price-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.price {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.price-sub { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 1.25rem; }
.price-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  flex: 1;
}
.price-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--fg);
  font-weight: 600;
}
.price-cta { text-align: center; }
.badge-solid {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: #fff;
  border: none;
  margin: 0;
}
.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--muted); margin-top: 0.75rem; }

/* ---------- Templates callout band ---------- */
.templates-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: center;
}
.templates-copy h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0.4rem 0 0.9rem; }
.templates-copy p { color: #cfcfcf; font-size: 1.08rem; margin-bottom: 1.8rem; max-width: 46ch; }
.templates-copy .btn-primary { background: #fff; color: #111; font-weight: 700; }
.templates-copy .btn-primary:hover { background: #e5e5e5; }
/* Editorial list of industries */
.templates-list { display: flex; flex-direction: column; }
.templates-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--fg-on-accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
  transition: padding-left 0.18s ease, color 0.15s ease;
}
.templates-list a:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.templates-list a:hover { padding-left: 0.9rem; text-decoration: none; }
.templates-list .go {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfcfcf;
  transition: transform 0.18s ease, color 0.15s ease;
}
.templates-list a:hover .go { transform: translateX(4px); color: var(--fg-on-accent); }
@media (max-width: 760px) {
  .templates-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Pitch band ---------- */
.pitch {
  text-align: center;
  max-width: 700px;
}
.pitch p {
  color: #cfcfcf;
  font-size: 1.15rem;
  margin: 1rem 0 2rem;
}
.section-accent .pitch strong { color: #fff; }
.section-accent .btn-primary { background: #fff; color: #111; }
.section-accent .btn-primary:hover { background: #e5e5e5; }

/* ---------- Contact form ---------- */
.contact { max-width: 620px; }
.contact-form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.85rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d8d8d8;
  border-radius: var(--radius);
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--fg);
  outline-offset: 1px;
  border-color: var(--fg);
}
.form-status { font-size: 0.9rem; min-height: 1.2em; margin-top: -0.25rem; }
.form-status.error { color: #b91c1c; }
.form-status.success { color: #15803d; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand .brand { display: inline-flex; margin-bottom: 0.5rem; font-size: 1.4rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 26ch; }
.footer-nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: var(--fg); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--muted); text-decoration: none; }
.footer-contact { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.footer-contact > a:first-child { color: var(--fg); font-size: 0.92rem; }
.footer-cta { font-size: 0.9rem; padding: 0.5rem 1.1rem; }
.footer-bottom { padding-top: 1.5rem; }
.footer-bottom p { color: var(--muted); font-size: 0.85rem; }

/* ---------- Stats band ---------- */
.stats-band {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 0;
  row-gap: 1.5rem;
  text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.25rem 1.5rem; }
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-from { font-size: 0.5em; font-weight: 500; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
@media (min-width: 681px) {
  .stat:not(:last-child) { border-right: 1px solid var(--border); }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero entrance ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero .eyebrow,
.hero h1,
.hero-sub,
.hero-actions,
.hero-note {
  opacity: 0;
  animation: riseIn 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero .eyebrow   { animation-delay: 0.05s; }
.hero h1         { animation-delay: 0.16s; }
.hero-sub        { animation-delay: 0.30s; }
.hero-actions    { animation-delay: 0.44s; }
.hero-note       { animation-delay: 0.58s; }

/* ---------- Hover polish ---------- */
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.22s ease;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16); }

.section-muted .card,
.price-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.section-muted .card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09); }
.price-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero .eyebrow, .hero h1, .hero-sub, .hero-actions, .hero-note { opacity: 1 !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 0.5rem 0; }
}
