/* ============================================================
   CoastFire.org — style.css
   EDIT: Colors defined as CSS variables below
   ============================================================ */

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

/* EDIT: Brand color palette */
:root {
  --navy:       #0f2240;
  --navy-mid:   #1a3a6b;
  --teal:       #2a9d8f;
  --teal-light: #38b2a3;
  --teal-pale:  #e6f7f5;
  --green-soft: #52b788;
  --gray-bg:    #f4f6f9;
  --gray-light: #eaecf0;
  --gray-mid:   #9aa3b0;
  --gray-dark:  #4a5568;
  --white:      #ffffff;
  --text:       #1c2b3a;
  --text-light: #5a6a7e;
  --danger:     #e05252;
  --success:    #2a9d8f;
  --warn:       #f4a261;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(15,34,64,.09);
  --shadow-lg:  0 8px 40px rgba(15,34,64,.13);
  --transition: .22s cubic-bezier(.4,0,.2,1);

  /* EDIT: Typography */
  --font-head: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--gray-bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* === HEADER === */
#site-header {
  position: sticky; top: 0; z-index: 999;
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(15,34,64,.22);
  padding: 0 24px;
}
.header-inner {
  max-width: 1140px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 1.35rem; font-weight: 700;
  color: var(--white); letter-spacing: -.01em;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--teal);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo span { color: var(--teal-light); }
nav ul { list-style: none; display: flex; gap: 4px; }
nav ul li a {
  color: rgba(255,255,255,.82);
  padding: 6px 12px; border-radius: 6px;
  font-size: .88rem; font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
nav ul li a:hover { color: var(--white); background: rgba(255,255,255,.1); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
#hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1d5470 100%);
  padding: 72px 24px 64px; text-align: center; color: var(--white);
  position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(42,157,143,.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; margin: auto; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(42,157,143,.22); border: 1px solid rgba(42,157,143,.4);
  color: var(--teal-light); border-radius: 99px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  padding: 5px 14px; margin-bottom: 22px; text-transform: uppercase;
}
#hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.18;
  margin-bottom: 20px; letter-spacing: -.02em;
}
#hero h1 em { color: var(--teal-light); font-style: normal; }
#hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255,255,255,.82);
  max-width: 580px; margin: 0 auto 28px;
}
.hero-cta {
  display: inline-block;
  background: var(--teal); color: var(--white);
  padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  box-shadow: 0 4px 20px rgba(42,157,143,.4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(42,157,143,.5); text-decoration: none; }
.hero-trust {
  margin-top: 22px; font-size: .82rem;
  color: rgba(255,255,255,.5); display: flex; justify-content: center;
  gap: 18px; flex-wrap: wrap;
}
.hero-trust span::before { content: '✓ '; color: var(--teal-light); }

/* === LAYOUT === */
.page-section { padding: 64px 24px; }
.section-inner { max-width: 1100px; margin: auto; }
.section-inner.narrow { max-width: 780px; }
.section-label {
  text-transform: uppercase; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; color: var(--teal); margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--navy); font-weight: 700; line-height: 1.25; margin-bottom: 16px;
}
.section-sub { color: var(--text-light); font-size: 1.05rem; max-width: 600px; margin-bottom: 40px; }

/* === AD SLOTS === */
.ad-slot {
  background: var(--gray-light); border: 1.5px dashed var(--gray-mid);
  border-radius: var(--radius-sm); text-align: center; padding: 22px;
  color: var(--gray-mid); font-size: .8rem; margin: 32px 0; letter-spacing: .04em;
}

/* === CALCULATOR === */
#calculator { background: var(--white); }
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Cards ── */
.calc-card {
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.result-card {
  background: var(--white);
  border: 1.5px solid rgba(42,157,143,.25);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 80px;
}

/* ── Field groups ── */
.field-group {
  margin-bottom: 20px;
}
.field-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.field-hint {
  font-size: .78rem;
  color: var(--text-light);
  margin-top: 5px;
  line-height: 1.4;
}
.optional-label {
  font-size: .75rem;
  font-weight: 400;
  color: var(--gray-mid);
  margin-left: 4px;
}

/* ── Inputs ── */
input[type="number"],
select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,157,143,.12);
}
input.invalid { border-color: var(--danger) !important; }

/* prefix / suffix wrappers */
.prefix-input-wrap,
.suffix-input-wrap {
  display: flex;
  align-items: stretch;
  height: 48px;
}
.input-prefix,
.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 13px;
  background: var(--gray-bg);
  border: 1.5px solid var(--gray-light);
  font-size: .9rem;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}
.input-prefix {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-suffix {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prefix-input-wrap input[type="number"] {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  height: 48px;
}
.suffix-input-wrap input[type="number"] {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  height: 48px;
}

/* Two-column field row */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Error messages */
.error-msg { font-size: .78rem; color: var(--danger); margin-top: 5px; display: none; }
.error-msg.show { display: block; }

/* ── Buttons ── */
.calc-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn {
  padding: 0 22px;
  height: 46px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
  flex: 1;
  box-shadow: 0 4px 14px rgba(42,157,143,.3);
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-1px); }
.btn-secondary {
  background: var(--gray-bg);
  color: var(--navy);
  border: 1.5px solid var(--gray-light);
}
.btn-secondary:hover { background: var(--gray-light); }
.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid var(--gray-light);
}
.btn-outline:hover { border-color: var(--gray-mid); color: var(--navy); }

/* ── Results ── */
/* Status */
.result-status {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-bottom: 22px;
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.5;
}
.result-status.achieved  { background: rgba(42,157,143,.1);  color: #1a6e63; border: 1.5px solid rgba(42,157,143,.28); }
.result-status.in-progress { background: rgba(244,162,97,.09); color: #a0521a; border: 1.5px solid rgba(244,162,97,.3); }
.result-status.empty     { background: var(--gray-bg); color: var(--gray-mid); border: 1.5px solid var(--gray-light); font-weight: 400; }

/* Main coast number */
.result-main {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 22px;
}
.result-main-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}
.result-main-value {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.result-main-sub {
  font-size: .77rem;
  color: rgba(255,255,255,.5);
  margin-top: 7px;
}

/* Progress bar */
.result-progress {
  margin-bottom: 20px;
}
.result-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.result-bar {
  width: 100%;
  height: 10px;
  border-radius: 99px;
  background: var(--gray-light);
  overflow: hidden;
}
.result-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--green-soft));
  transition: width .65s cubic-bezier(.4,0,.2,1);
}

/* Result rows */
.result-rows {
  margin-bottom: 20px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-light);
}
.result-row:last-child { border-bottom: none; }
.rr-label { font-size: .83rem; color: var(--text-light); }
.rr-value { font-size: .95rem; font-weight: 700; color: var(--navy); }
.rr-teal  { color: var(--teal); }
.rr-orange { color: var(--warn); }

/* Explanation + disclaimer */
.result-explanation {
  font-size: .83rem;
  color: var(--text-light);
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  line-height: 1.65;
}
.disclaimer-small {
  font-size: .74rem;
  color: var(--gray-mid);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
  font-style: italic;
  line-height: 1.5;
}

/* === SEO CONTENT === */
#content { background: var(--white); }
.content-body h2 {
  font-family: var(--font-head); font-size: clamp(1.3rem, 3vw, 1.75rem);
  color: var(--navy); margin: 44px 0 14px;
  border-left: 4px solid var(--teal); padding-left: 16px; line-height: 1.3;
}
.content-body h2:first-of-type { margin-top: 0; }
.content-body h3 { font-size: 1.12rem; color: var(--navy); margin: 28px 0 10px; font-weight: 700; }
.content-body p { margin-bottom: 16px; color: var(--text); line-height: 1.8; }
.content-body ul, .content-body ol { padding-left: 24px; margin-bottom: 16px; }
.content-body li { margin-bottom: 8px; color: var(--text); line-height: 1.7; }
.content-body strong { color: var(--navy); }
.info-box { background: var(--teal-pale); border-left: 4px solid var(--teal); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 20px; margin: 24px 0; }
.info-box p { margin: 0; color: #1a6e63; font-weight: 500; }

.compare-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .92rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th { background: var(--navy); color: var(--white); padding: 14px 18px; text-align: left; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.compare-table td { padding: 12px 18px; border-bottom: 1px solid var(--gray-light); background: var(--white); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--gray-bg); }
.compare-table td:first-child { font-weight: 600; color: var(--navy); }
.check { color: var(--teal); font-weight: 700; }
.cross { color: var(--danger); font-weight: 700; }

.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 28px 0; }
.benefit-card { background: var(--gray-bg); border-radius: var(--radius); padding: 22px; border: 1px solid var(--gray-light); }
.benefit-icon { width: 42px; height: 42px; background: var(--teal-pale); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.4rem; }
.benefit-card h4 { font-size: .95rem; color: var(--navy); margin-bottom: 8px; font-weight: 700; }
.benefit-card p { font-size: .85rem; color: var(--text-light); margin: 0; line-height: 1.6; }

/* === FAQ === */
#faq { background: var(--gray-bg); }
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item { background: var(--white); border: 1.5px solid var(--gray-light); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(15,34,64,.04); }
.faq-q { width: 100%; background: none; border: none; text-align: left; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; font-weight: 600; color: var(--navy); transition: color var(--transition); line-height: 1.4; }
.faq-q:hover { color: var(--teal); }
.faq-icon { flex-shrink: 0; width: 26px; height: 26px; background: var(--teal-pale); color: var(--teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform var(--transition), background var(--transition); margin-left: 12px; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--teal); color: var(--white); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .38s cubic-bezier(.4,0,.2,1), padding .2s; padding: 0 24px; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a p { margin: 0 0 20px; color: var(--text-light); font-size: .95rem; line-height: 1.7; }

/* === YOUTUBE === */
#video { background: var(--navy); padding: 64px 24px; text-align: center; }
#video .section-title { color: var(--white); }
#video .section-sub { color: rgba(255,255,255,.65); margin: 0 auto 32px; }
.video-container { max-width: 760px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.video-container iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }

/* === ABOUT === */
#about { background: var(--teal-pale); }
.about-card { background: var(--white); border-radius: var(--radius); padding: 40px; max-width: 720px; box-shadow: var(--shadow); }
.about-card p { color: var(--text-light); margin-bottom: 14px; }
.about-card p:last-child { margin: 0; }

/* === CONTACT === */
#contact { background: var(--gray-bg); }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 40px; max-width: 580px; box-shadow: var(--shadow); }
.contact-email { display: inline-flex; align-items: center; gap: 10px; background: var(--teal-pale); color: var(--teal); padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: .95rem; margin: 16px 0; }
.contact-note { font-size: .85rem; color: var(--text-light); margin-top: 14px; }

/* === LEGAL === */
#legal { background: var(--white); }
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.legal-tab { padding: 8px 18px; border-radius: 6px; border: 1.5px solid var(--gray-light); background: var(--gray-bg); color: var(--navy); font-size: .88rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.legal-tab.active, .legal-tab:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.legal-panel { display: none; }
.legal-panel.active { display: block; background: var(--gray-bg); border-radius: var(--radius); padding: 28px; max-width: 820px; border: 1.5px solid var(--gray-light); }
.legal-panel h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; font-weight: 700; margin-top: 20px; }
.legal-panel h3:first-child { margin-top: 0; }
.legal-panel p { font-size: .88rem; color: var(--text-light); margin-bottom: 12px; line-height: 1.7; }
.legal-panel ul { padding-left: 20px; }
.legal-panel li { font-size: .88rem; color: var(--text-light); margin-bottom: 6px; }

/* === FOOTER === */
#site-footer { background: var(--navy); color: rgba(255,255,255,.55); padding: 48px 24px 28px; }
.footer-inner { max-width: 1100px; margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: .85rem; margin-top: 12px; line-height: 1.6; }
.footer-col h4 { color: var(--white); font-size: .88rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.5); font-size: .85rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--teal-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; max-width: 1100px; margin: 0 auto; }
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--teal-light); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .calc-wrapper { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  /* Nav */
  .nav-toggle { display: flex; }
  nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy); padding: 16px 24px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 4px; }
  nav ul li a { display: block; padding: 11px 14px; font-size: .95rem; }

  /* Hero */
  #hero { padding: 48px 20px 44px; }

  /* Calculator */
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .calc-card, .result-card { padding: 20px 16px; }

  /* Results — full-width rows, easy to read on phone */
  .result-main-value { font-size: 2rem; }
  .rr-label { font-size: .82rem; }
  .rr-value { font-size: .92rem; }

  /* Buttons */
  .calc-btn-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; height: 50px; font-size: .95rem; }
  .btn-primary { flex: none; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 400px) {
  .page-section { padding: 48px 16px; }
}
