/* ===== CSS Custom Properties ===== */
:root {
  --color-navy: #0F1120;
  --color-navy-light: #1A1D2E;
  --color-navy-lighter: #252A3E;
  --color-orange: #FF6B35;
  --color-orange-dark: #E55A2B;
  --color-orange-light: #FF8C5A;
  --color-offwhite: #F4F4F6;
  --color-white: #FFFFFF;
  --color-gray: #A0A8C0;
  --color-gray-dark: #6B7280;
  --color-success: #34D399;
  --color-warning: #FBBF24;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.15);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: var(--color-orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-orange-light);
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-orange);
  color: var(--color-navy);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== Header ===== */
.site-header {
  background: var(--color-navy-light);
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-white);
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--color-orange);
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
}

.nav-list a {
  color: var(--color-gray);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-navy);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-orange-dark);
  color: var(--color-navy);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ===== Hero ===== */
.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: linear-gradient(180deg, var(--color-navy-light) 0%, var(--color-navy) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-gray);
  margin-bottom: var(--space-xl);
  max-width: 45ch;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

/* ===== Sections General ===== */
section {
  padding: var(--space-3xl) 0;
}

section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--color-gray);
  font-size: 1.05rem;
  margin-bottom: var(--space-xl);
  max-width: 60ch;
}

/* ===== Calculator Section ===== */
.calculator-section {
  background: var(--color-navy-light);
  border-top: 1px solid rgba(255, 107, 53, 0.1);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.calc-card {
  background: var(--color-navy-lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 107, 53, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
  background: var(--color-navy);
  border: 1px solid rgba(160, 168, 192, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23A0A8C0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.btn-calc {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

/* ===== Results Panel ===== */
.results-panel {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(160, 168, 192, 0.2);
}

.results-panel h3 {
  font-size: 1.3rem;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}

.result-item {
  background: var(--color-navy);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  border: 1px solid rgba(160, 168, 192, 0.15);
}

.result-highlight {
  border-color: var(--color-orange);
  box-shadow: var(--shadow-glow);
}

.result-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gray);
  margin-bottom: var(--space-sm);
}

.result-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-orange);
  line-height: 1.2;
}

.result-unit {
  display: block;
  font-size: 0.85rem;
  color: var(--color-gray-dark);
  margin-top: var(--space-xs);
}

.result-note {
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--color-gray-dark);
  font-style: italic;
}

/* ===== Guide Section ===== */
.guide-section {
  background: var(--color-navy);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.guide-card {
  background: var(--color-navy-lighter);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  border: 1px solid rgba(160, 168, 192, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guide-card:hover {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: var(--shadow-md);
}

.guide-icon {
  margin-bottom: var(--space-md);
}

.guide-card h3 {
  font-size: 1.1rem;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.guide-card p {
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 1.7;
}

/* ===== FAQ Section ===== */
.faq-section {
  background: var(--color-navy-light);
  border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.faq-list {
  max-width: 800px;
}

.faq-item {
  border-bottom: 1px solid rgba(160, 168, 192, 0.15);
}

.faq-item summary {
  padding: var(--space-lg) 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--color-white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  transition: color 0.2s;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-orange);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

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

.faq-answer {
  padding: 0 0 var(--space-lg);
  color: var(--color-gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-navy-light);
  border-top: 1px solid rgba(255, 107, 53, 0.15);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: auto;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand p {
  color: var(--color-gray-dark);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

.footer-nav {
  display: flex;
  gap: var(--space-lg);
}

.footer-nav a {
  color: var(--color-gray);
  font-size: 0.9rem;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-gray-dark);
  border-top: 1px solid rgba(160, 168, 192, 0.1);
  padding-top: var(--space-md);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual svg {
    max-width: 200px;
  }

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

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

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

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

  .nav-list {
    gap: var(--space-md);
    font-size: 0.9rem;
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .calc-card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

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

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Utility ===== */
[hidden] {
  display: none !important;
}



/* 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;
}

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
