/* ============================================================
   The Vibe Code Checkup — styles.css
   ============================================================ */

/* ---- Custom properties ---- */
:root {
  --green: #1D4E3A;
  --green-light: #EDF3EF;
  --bg: #F5F3EF;
  --surface: #F7F6F3;
  --surface-dark: #EDEAE4;
  --muted: #7A7570;
  --border: #D4D0CA;
  --border-strong: #C5C0B8;
  --text: #2A2724;
  --text-light: #5C5752;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --max-width: 1140px;
  --section-pad: 5rem 1.5rem;
}

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

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* ---- Typography ---- */
h1, h2, h3, .wordmark, blockquote {
  font-family: var(--serif);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--text); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; font-family: var(--sans); }

p { margin-top: 0.75rem; }
p:first-child { margin-top: 0; }

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

/* ---- Utility ---- */
.section-label {
  font-size: 0.7rem;
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 2rem;
}

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

/* ---- Nav ---- */
.announcement-bar {
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  letter-spacing: 0.01em;
}

nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.nav-domain {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- Hero ---- */
.hero {
  padding: 4.5rem 1.5rem 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.hero-left {
  padding-top: 1rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.hero-left h1 {
  margin-bottom: 1.25rem;
}

.hero-subhead {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.trust-line {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.trust-line span {
  white-space: nowrap;
}

/* ---- Clipboard form ---- */

/*
  Two-piece clipboard background:
  - clipboard-top.png  : clip hardware + wooden board (no-repeat, top)
  - clipboard-tile.png : paper texture slice that repeats-y to fill any height
  Both images are 1728px wide; they scale together via background-size: 100% auto.
  The top cap is 620/1728 = ~35.9% tall relative to its width when displayed.
*/
/*
  Three-piece clipboard — all cropped from the same processed image so colours match.
  cb-top.png    1728×650  — clip + wooden board top cap (no-repeat)
  cb-tile.png   1728×300  — pure paper texture, repeats-y to fill any form height
  cb-bottom.png 1728×132  — wooden bottom edge cap (no-repeat)

  .clipboard-wrap  = top cap (padding-top 37.62% maintains aspect ratio)
  .clipboard       = tile background, grows with form content
  .clipboard-foot  = bottom cap (padding-top 7.64%)

  All widths are 1728px → background-size: 100% auto scales them together.
*/
.clipboard-wrap {
  background-image: url('assets/cb-top.png');
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: top center;
  padding-top: 37.62%;
  position: relative;
}

.clipboard {
  background-color: rgb(232, 232, 222);
  background-image: url('assets/cb-tile.png');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  border: none;
  border-radius: 0;
  padding: 0.75rem 1.75rem 1.25rem;
  position: relative;
}

.clipboard-foot {
  background-image: url('assets/cb-bottom.png');
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: top center;
  padding-top: 7.64%;
  width: 100%;
}

/* ---- Form elements ---- */
.form-field {
  margin-bottom: 0.65rem;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  background: rgba(248, 246, 240, 0.85);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.45rem 0.65rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field textarea:focus {
  border-color: var(--green);
}

.form-field textarea {
  resize: none;
  height: 5.5rem;
  line-height: 1.55;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
}

/* ---- Checkboxes ---- */
.checkbox-section-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

.checkbox-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.checkbox-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: 2px solid var(--border-strong);
  border-radius: 3px;
  background: rgba(248, 246, 240, 0.85);
  cursor: pointer;
  margin-top: 3px;
  position: relative;
  transition: background 0.12s, border-color 0.12s;
}

.checkbox-list input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

.checkbox-list input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-list label {
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1.45;
}

/* ---- Submit button ---- */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--green);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  text-align: center;
  margin-top: 1.25rem;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.88; }

.form-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ---- Pillars ---- */
.pillars-section {
  padding: var(--section-pad);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.pillar-numeral {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--border-strong);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.pillar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.pillar-body {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ---- Product ladder ---- */
.ladder-section {
  padding: var(--section-pad);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ladder {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.ladder-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.ladder-row:last-child {
  border-bottom: none;
}

.ladder-row--highlight {
  background: var(--green-light);
}

.ladder-row--casestudy {
  background: var(--surface);
  padding-left: 3.5rem;
  border-left: 3px solid var(--green-light);
}

.ladder-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ladder-step {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.ladder-step--arrow {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.ladder-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ladder-row--highlight .ladder-label {
  color: var(--green);
}

.ladder-row--casestudy .ladder-label {
  color: var(--text);
}

.ladder-optional {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}

.ladder-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
}

.ladder-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
  white-space: nowrap;
}

.ladder-row:not(.ladder-row--highlight):not(.ladder-row--casestudy) .ladder-cta {
  color: var(--muted);
}

.ladder-cta--always {
  color: var(--text-light);
  font-style: italic;
  font-weight: 400;
}

.ladder-casestudy-note {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.ladder-footnote {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
  text-align: right;
}

/* ---- Bottom CTA ---- */
.bottom-cta-section {
  padding: var(--section-pad);
  border-top: 1px solid var(--border);
  text-align: center;
}

.bottom-cta-center {
  max-width: 600px;
  margin: 0 auto;
}

.bottom-cta-center h2 {
  margin-bottom: 1.5rem;
}

.bottom-cta-email {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  margin-bottom: 1.25rem;
  text-align: left;
  transition: border-color 0.15s;
}

.bottom-cta-email:focus { border-color: var(--green); }
.bottom-cta-email::placeholder { color: var(--muted); }

.bottom-cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.bottom-cta-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-secondary:hover {
  background: var(--green-light);
  opacity: 1;
}

/* ---- Footer (removed standalone, merged into bottom-cta) ---- */
.footer-domain {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Case study form (shared between sections) ---- */

.casestudy-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.casestudy-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.casestudy-form input[type="email"]:focus {
  border-color: var(--green);
}

.casestudy-form input::placeholder {
  color: var(--muted);
}

.casestudy-note {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---- Footer CTA ---- */
.footer-cta {
  padding: var(--section-pad);
  text-align: center;
}

.footer-cta h2 {
  margin-bottom: 0.75rem;
}

.footer-cta .footer-sub {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.btn-primary--auto {
  display: inline-block;
  width: auto;
  padding: 0.85rem 2.25rem;
}

.footer-domain {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .pillars {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .ladder-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ladder-cta {
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .bottom-cta-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .bottom-cta-divider {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 1.25rem 3rem;
  }

  .hero-left {
    padding-top: 0;
  }

  .pillars-section,
  .proof-section,
  .ladder-section,
  .footer-cta {
    padding: 3rem 1.25rem;
  }

  .nav-inner {
    padding: 1rem 1.25rem;
  }

  .wordmark {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .ladder-row {
    padding: 1.25rem;
  }
}
