/* PaddleFit - Kayak Paddle Sizing Guide */
:root {
  --color-primary: #0e7490;
  --color-primary-dark: #0a5c72;
  --color-primary-light: #e0f2fe;
  --color-accent: #f59e0b;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-bg: #f8fafc;
  --color-white: #ffffff;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #22d3ee 100%);
  color: var(--color-white);
  padding: 4rem 0 4.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #1e293b;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: #d97706;
  border-color: #d97706;
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
}

.btn-preset {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-preset:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-full {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
}

/* Calculator Section */
.calculator-section {
  padding: 3rem 0;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.calc-form h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.preset-buttons {
  margin-bottom: 1.5rem;
}

.preset-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.input-row input {
  width: 80px;
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.15s;
}

.input-row input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.input-suffix {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.3rem;
}

/* Results */
.calc-results {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  min-height: 300px;
}

.results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 220px;
  color: var(--color-text-light);
  text-align: center;
  gap: 1rem;
}

.results-empty p {
  max-width: 240px;
}

.results-content h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.result-card {
  background: linear-gradient(135deg, var(--color-primary-light), #cffafe);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.result-main {
  text-align: center;
  margin-bottom: 1.25rem;
}

.result-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.result-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.result-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-item {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
}

.result-item-label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.result-item-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.result-tips {
  margin-bottom: 1.25rem;
}

.result-tips p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.result-tips p:last-child {
  border-bottom: none;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-actions .btn {
  flex: 1;
  min-width: 120px;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}

/* Guide Section */
.guide-section {
  padding: 3rem 0;
  background: var(--color-white);
}

.guide-section h2 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.guide-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--color-border);
}

.guide-icon {
  margin-bottom: 1rem;
}

.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.content-block {
  margin-bottom: 2rem;
}

.content-block h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.content-block p {
  margin-bottom: 0.75rem;
  color: var(--color-text-light);
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.checklist li:last-child {
  border-bottom: none;
}

/* FAQ Section */
.faq-section {
  padding: 3rem 0;
}

.faq-section h2 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2rem;
}

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

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  background: var(--color-primary-light);
}

.faq-item p {
  padding: 0 1.25rem 1rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: #94a3b8;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-brand .logo-mark {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-white);
}

.footer-brand p {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: #cbd5e1;
}

.footer-note {
  color: #64748b;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero,
  .preset-buttons,
  .result-actions,
  .faq-section,
  .guide-section {
    display: none;
  }

  .calculator-section {
    padding: 0;
  }

  .calc-layout {
    display: block;
  }

  .calc-form {
    display: none;
  }

  .calc-results {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .result-card {
    border: 2px solid #000;
    background: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .calc-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    gap: 1rem;
  }

  .main-nav a {
    font-size: 0.8rem;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .calc-form,
  .calc-results {
    padding: 1.25rem;
  }

  .input-row input {
    width: 65px;
    padding: 0.45rem 0.55rem;
  }
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Animation for results */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-content[hidden] {
  display: none;
}

.results-content {
  animation: fadeIn 0.3s ease;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--color-text);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.toast-success {
  background: var(--color-success);
}

.toast-error {
  background: var(--color-error);
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
