/* SignRoad marketing site — shared styles for SEO landing pages, tools and quizzes */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --sr-canvas: #FBF7F0;
  --sr-card: #F5EDE0;
  --sr-soft: #EDE4D6;
  --sr-white: #FFFFFF;
  --sr-ink: #2A1F18;
  --sr-ink-secondary: #5A4A3D;
  --sr-ink-muted: #8A7A6C;
  --sr-accent: #FF4D01;
  --sr-accent-hover: #D94000;
  --sr-green: #2E7D52;
  --sr-green-soft: #EDF7F1;
  --sr-gold: #C9A84C;
  --sr-gold-soft: #FFF8E6;
  --sr-purple: #7C5CFC;
  --sr-purple-soft: #F0EDFF;
  --sr-blue: #4DADFF;
  --sr-border: rgba(42, 31, 24, 0.08);
  --sr-shadow: 0 2px 20px rgba(42, 31, 24, 0.06);
  --sr-shadow-lg: 0 8px 40px rgba(42, 31, 24, 0.12);
  --sr-radius: 18px;
  --sr-radius-sm: 12px;
  --sr-radius-xs: 8px;
  --max-w: 1100px;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'ui-monospace', 'SFMono-Regular', 'Menlo', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--sr-canvas);
  color: var(--sr-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography */

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; }

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; color: var(--sr-ink-secondary); }

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sr-accent);
  display: block;
  margin-bottom: 0.75rem;
}

/* Layout */

.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-header h2 { margin-bottom: 0.75rem; }

.section-header p { color: var(--sr-ink-secondary); font-size: 1.0625rem; }

.bg-white { background: var(--sr-white); }
.bg-cream { background: var(--sr-card); }
.bg-soft { background: var(--sr-soft); }

/* Nav */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(251, 247, 240, 0.88);
  border-bottom: 1px solid var(--sr-border);
  padding: 0.75rem 1.25rem;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--sr-ink);
  text-decoration: none;
}

nav .logo span { color: var(--sr-accent); }

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

.nav-links a {
  color: var(--sr-ink-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover { color: var(--sr-accent); text-decoration: none; }

.nav-cta {
  background: var(--sr-accent);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.nav-cta:hover { background: var(--sr-accent-hover); color: #fff !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sr-ink);
  transition: transform 0.2s ease;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--sr-canvas);
  border-bottom: 1px solid var(--sr-border);
  padding: 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--sr-ink-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* Hero */

.hero {
  text-align: center;
  padding: 5rem 0 4rem;
  position: relative;
}

.hero h1 { margin-bottom: 1rem; }

.hero p.lede {
  font-size: 1.125rem;
  color: var(--sr-ink-secondary);
  max-width: 680px;
  margin: 0 auto 1.75rem;
}

.hero .meta {
  font-size: 0.8125rem;
  color: var(--sr-ink-muted);
  margin-top: 1.25rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: var(--sr-accent);
  color: #fff;
}

.btn-primary:hover { background: var(--sr-accent-hover); color: #fff; }

.btn-secondary {
  background: var(--sr-card);
  color: var(--sr-ink);
  border: 1px solid var(--sr-border);
}

.btn-secondary:hover { background: var(--sr-soft); color: var(--sr-ink); }

.btn-green { background: var(--sr-green); color: #fff; }
.btn-green:hover { background: #236142; color: #fff; }

.btn-small { padding: 0.6rem 1rem; font-size: 0.8125rem; }

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--sr-card);
  border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius);
  padding: 1.5rem;
  box-shadow: var(--sr-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--sr-shadow-lg); }

.card h3 { margin-bottom: 0.5rem; }

.card p { font-size: 0.9375rem; margin-bottom: 0.75rem; }

.card .meta { font-size: 0.75rem; color: var(--sr-ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
}

.feature-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--sr-ink-secondary);
  list-style: none;
}

.feature-list li::before {
  content: '✦';
  color: var(--sr-accent);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Two column */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1.25rem 0;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--sr-border);
}

th { font-weight: 600; color: var(--sr-ink); }
td { color: var(--sr-ink-secondary); }

/* FAQ */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--sr-border);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font: inherit;
  font-weight: 600;
  color: var(--sr-ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: '+'; color: var(--sr-accent); font-weight: 400; }

.faq-q.open::after { content: '−'; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a.open { max-height: 500px; }

.faq-a p { padding: 0 0 1.25rem; color: var(--sr-ink-secondary); }

/* Quiz */

.quiz-root, .tool-root {
  background: var(--sr-card);
  border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius);
  padding: 1.75rem;
  max-width: 720px;
  margin: 2rem auto;
  box-shadow: var(--sr-shadow);
}

.quiz-root h3, .tool-root h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.quiz-progress {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sr-ink-muted);
  margin-bottom: 1.25rem;
}

.quiz-question {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--sr-ink);
}

.quiz-options, .tool-options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quiz-option, .tool-option, .tool-chip {
  text-align: left;
  background: var(--sr-white);
  border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius-sm);
  padding: 1rem 1.125rem;
  font: inherit;
  color: var(--sr-ink-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover, .tool-option:hover, .tool-chip:hover {
  border-color: var(--sr-accent);
  background: #fff8f5;
}

.quiz-option.selected, .tool-chip.selected {
  border-color: var(--sr-accent);
  background: #fff0e8;
  color: var(--sr-ink);
  font-weight: 500;
}

.quiz-result, .tool-result {
  background: var(--sr-white);
  border-radius: var(--sr-radius-sm);
  padding: 1.25rem;
  margin-top: 1.25rem;
  border: 1px solid var(--sr-border);
}

.quiz-result h4, .tool-result h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.quiz-result p, .tool-result p { margin-bottom: 0.75rem; }

/* Tools */

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tool-chip {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
}

.tool-output {
  background: var(--sr-white);
  border-radius: var(--sr-radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--sr-border);
  min-height: 100px;
}

.tool-output:empty::before {
  content: 'Select an option above to get your result.';
  color: var(--sr-ink-muted);
  font-style: italic;
}

/* CTA sections */

.cta-section {
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 { margin-bottom: 1rem; }

.cta-section p { max-width: 560px; margin: 0 auto 1.5rem; }

/* Footer */

footer {
  border-top: 1px solid var(--sr-border);
  padding: 2rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--sr-ink-muted);
}

.footer-links { display: flex; gap: 1.25rem; }

.footer-links a { color: var(--sr-ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--sr-accent); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Animations */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Breadcrumb */

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--sr-ink-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--sr-ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sr-accent); }

/* Inline code / tags */

.tag {
  display: inline-block;
  background: var(--sr-soft);
  color: var(--sr-ink-secondary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.375rem;
  margin-bottom: 0.375rem;
}

.tag-premium { background: var(--sr-gold-soft); color: #7a5c00; }
.tag-rare { background: var(--sr-purple-soft); color: var(--sr-purple); }

/* Block quote / science note */

.science-note {
  background: var(--sr-green-soft);
  border-left: 4px solid var(--sr-green);
  border-radius: 0 var(--sr-radius-sm) var(--sr-radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.science-note strong { color: var(--sr-ink); }

.science-note cite {
  display: block;
  font-size: 0.75rem;
  color: var(--sr-ink-muted);
  margin-top: 0.5rem;
  font-style: normal;
}

/* Tip card */

.tip-card {
  background: var(--sr-gold-soft);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--sr-radius-sm);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.tip-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }

.tip-card p { font-size: 0.937rem; margin-bottom: 0; }

/* Receipt mini demo */

.receipt-mini {
  background: var(--sr-white);
  border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  box-shadow: var(--sr-shadow);
  max-width: 320px;
}

.receipt-mini .line { display: flex; justify-content: space-between; margin-bottom: 0.375rem; color: var(--sr-ink-secondary); }

.receipt-mini .line span:first-child { color: var(--sr-ink-muted); }

/* Cover images */

.cover-image {
  margin: 1.5rem auto 0;
  max-width: 720px;
  border-radius: var(--sr-radius);
  overflow: hidden;
  box-shadow: var(--sr-shadow-lg);
  border: 1px solid var(--sr-border);
}

.cover-image img {
  width: 100%;
  height: auto;
  display: block;
}
