/* ==========================================================================
   NATHAN'S FLAGS — style.css
   Clean, patriotic, editorial design.
   To change colors, fonts, or spacing, edit the variables below.
   ========================================================================== */

/* ---------- 1. DESIGN TOKENS (edit these to re-theme the site) ---------- */
:root {
  /* Colors — official U.S. flag palette (Old Glory) */
  --navy:        #0a3161;   /* Old Glory Blue — headings & dark section */
  --navy-soft:   #10437f;   /* slightly lighter flag blue */
  --red:         #b31942;   /* Old Glory Red — accents & buttons */
  --red-soft:    #cf2c55;   /* hover shade of red */
  --ink:         #1f2c45;   /* body text — blue-leaning ink */
  --muted:       #5c6b85;   /* secondary text — muted flag blue */
  --paper:       #ffffff;   /* page background — flag white */
  --tint:        #eef3fa;   /* tinted section — whisper of flag blue */
  --card:        #ffffff;   /* card background */
  --line:        #dde5f0;   /* hairline borders — cool blue-gray */

  /* Type — system stack, feels native on every device */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Shape & shadow */
  --radius: 18px;
  --shadow:      0 1px 2px rgba(10, 49, 97, .05), 0 8px 30px rgba(10, 49, 97, .08);
  --shadow-lift: 0 2px 4px rgba(10, 49, 97, .06), 0 16px 44px rgba(10, 49, 97, .14);

  /* Layout */
  --container: 1080px;
  --nav-height: 64px;
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;                    /* smooth anchor scrolling */
  scroll-padding-top: calc(var(--nav-height) + 12px); /* offset for fixed nav */
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- 3. TYPOGRAPHY ---------- */
h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 750; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 650; }

/* Small uppercase label above headings */
.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9rem;
}
.eyebrow-light { color: #e6b8bf; }

/* Larger intro paragraph under headings */
.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 2.5rem;
}
.lead-light { color: #c4ccdd; }

/* ---------- 3b. FLAG BACKDROP ----------
   Full-page fixed American flag watermark (SVG lives in index.html).
   z-index -1 keeps it behind every section; pointer-events none
   means it never blocks clicks. */
.flag-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.flag-backdrop svg { width: 100%; height: 100%; }

/* ---------- 4. LAYOUT HELPERS ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.narrow { max-width: 860px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
/* Semi-transparent tint lets the flag backdrop show through softly */
.section-tinted { background: rgba(238, 243, 250, .72); }

/* Thin red / white / blue accent line used as a divider.
   Hairline borders keep the white stripe visible on white pages. */
.tricolor {
  height: 6px;
  background: linear-gradient(90deg,
    var(--red) 0 33.4%, #ffffff 33.4% 66.7%, var(--navy) 66.7% 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- 5. NAVIGATION ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
/* .scrolled is added by script.js once the page moves */
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
}
.nav-flag { width: 22px; height: 22px; color: var(--navy); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav-links a {
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--red); }

/* Small pill button in the nav */
.nav-cta {
  padding: .45rem 1.05rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff !important;
  transition: background .2s ease;
}
.nav-cta:hover { background: var(--red); }

/* ---------- 6. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(179, 25, 66, .28);
}
.btn-primary:hover {
  background: var(--red-soft);
  box-shadow: 0 10px 26px rgba(179, 25, 66, .34);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--navy);
  border: 1.5px solid var(--line);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--navy); }

.btn-large { font-size: 1.15rem; padding: 1rem 2.4rem; }
.btn-icon { width: 20px; height: 20px; }

/* ---------- 7. HERO ---------- */
.hero {
  padding-top: calc(var(--nav-height) + clamp(3rem, 8vw, 6rem));
  /* Transparent base so the flag backdrop shows; soft blue/red washes on top */
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(10, 49, 97, .08), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(179, 25, 66, .06), transparent 60%);
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px clamp(4rem, 8vw, 6.5rem);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 550;
  color: var(--red);
  margin: .9rem 0 1.4rem;
}

.hero-intro {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 54ch;
  margin-bottom: 2.2rem;
}

.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* Photo — rounded frame with layered accent behind it */
.hero-photo { position: relative; justify-self: center; }

.photo-frame {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: var(--tint);
  box-shadow: var(--shadow-lift);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* photo fills the frame, cropped nicely */
}

/* Monogram placeholder — hidden by script.js once nathan.jpg loads */
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 60%, #1a5296 100%);
}
.placeholder-monogram {
  font-size: 7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  line-height: 1;
}
.placeholder-note {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

/* Offset red frame behind the photo for depth */
.photo-accent {
  position: absolute;
  inset: 22px -22px -22px 22px;
  border-radius: calc(var(--radius) + 8px);
  border: 2px solid rgba(179, 25, 66, .35);
  z-index: -1;
}

/* ---------- 8. VALUE CARDS (About section) ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: .5rem;
}

.value-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.value-num {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--red);
  margin-bottom: .8rem;
}
.value-card h3 { margin-bottom: .5rem; }
.value-card p { font-size: .95rem; color: var(--muted); }

/* ---------- 9. PRICING CARD (Service section) ---------- */
.pricing-card {
  display: grid;
  grid-template-columns: auto 1px 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

.price-block { text-align: center; }
.price {
  display: block;
  font-size: clamp(3.2rem, 7vw, 4.5rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-caption {
  display: block;
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--muted);
}

.price-divider { width: 1px; height: 100%; min-height: 120px; background: var(--line); }

.price-features { list-style: none; display: grid; gap: 1.1rem; }
.price-features li { display: grid; gap: .1rem; padding-left: 1.6rem; position: relative; }
/* Red star bullet */
.price-features li::before {
  content: "\2605";               /* ★ */
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: .85rem;
  top: .15rem;
}
.feature-title { font-weight: 650; color: var(--navy); }
.feature-sub { font-size: .9rem; color: var(--muted); }

/* ---------- 10. HOLIDAY CARDS ---------- */
.holiday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
}

.holiday-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.holiday-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(179, 25, 66, .4);
}

.holiday-month {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .55rem;
}
.holiday-card h3 { font-size: 1.05rem; }
.holiday-sub {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: .15rem;
}

/* July 4th gets a navy featured card */
.holiday-featured { background: var(--navy); border-color: var(--navy); }
.holiday-featured .holiday-month { color: #e8a7b0; }
.holiday-featured h3 { color: #fff; }

/* ---------- 11. DARK COMMITMENT SECTION ---------- */
.section-dark {
  position: relative;
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(179, 25, 66, .22), transparent 60%),
    var(--navy);
}
/* Faint white star field over the navy, like the flag's canton */
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M30 20l2.9 6 6.7.9-4.9 4.6 1.2 6.6-5.9-3.2-5.9 3.2 1.2-6.6-4.9-4.6 6.7-.9z' fill='%23ffffff' fill-opacity='.055'/%3E%3Cpath d='M90 80l2.9 6 6.7.9-4.9 4.6 1.2 6.6-5.9-3.2-5.9 3.2 1.2-6.6-4.9-4.6 6.7-.9z' fill='%23ffffff' fill-opacity='.055'/%3E%3C/svg%3E");
}
/* Keep content above the star overlay */
.section-dark .container { position: relative; }
.section-dark h2 { color: #fff; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.stat-label {
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9db4d4;
}

/* ---------- 12. CONTACT & FOOTER ---------- */
.contact-note { margin-top: 1.1rem; font-size: .9rem; color: var(--muted); }

.footer { text-align: center; }
.footer-stars {
  padding-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: .7rem;
  font-size: .85rem;
}
.star-red  { color: var(--red); }
.star-blue { color: var(--navy); }
.footer p {
  padding: .6rem 24px 2.2rem;
  font-size: .92rem;
  color: var(--muted);
}

/* ---------- 13. REVEAL-ON-SCROLL ANIMATION ----------
   Elements with .reveal start invisible and slide up when
   script.js adds .visible (via IntersectionObserver). */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2, .6, .2, 1),
              transform .7s cubic-bezier(.2, .6, .2, 1);
}
.reveal.visible { opacity: 1; transform: none; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 14. RESPONSIVE BREAKPOINTS ---------- */

/* Tablet */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-intro, .hero-actions { margin-left: auto; margin-right: auto; justify-content: center; }
  .hero-photo { order: -1; }           /* photo above text on small screens */
  .photo-accent { inset: 16px -14px -14px 16px; }
  .value-grid { grid-template-columns: 1fr; }
  .pricing-card { grid-template-columns: 1fr; text-align: center; }
  .price-divider { width: 100%; height: 1px; min-height: 0; }
  .price-features li { text-align: left; }
}

/* Phone */
@media (max-width: 560px) {
  .nav-links a:not(.nav-cta) { display: none; }  /* keep nav minimal on phones */
  .stat-row { grid-template-columns: 1fr; gap: 1.8rem; }
  .btn-large { width: 100%; justify-content: center; }
}
