/* ================================================================
   CORE STYLESHEET — Inks Trim & Remodeling
   Every page (index, roofing, remodeling) includes this file. It
   contains:
     - Design tokens (:root + [data-theme="dark"])
     - Reset / base / utility classes
     - Nav (incl. theme toggle + the roofing<->remodeling switch pill)
     - Hero
     - Buttons
     - Footer
     - Scroll reveal
     - Responsive rules for all of the above

   Site-specific sections (services grid, gallery, about, contact +
   Formspree form, the index.html landing portal) live in /mods and
   are included only if a given page needs them. See mods/README.md.

   THEMING MODEL: secondary/muted text, borders, and overlays are
   written as rgba(var(--fg-rgb), X) rather than a hardcoded color,
   so flipping [data-theme="dark"] only requires redefining the
   handful of tokens below — no per-component dark override needed
   anywhere else in core or any mod file.

   NOTE — DEFAULT THEME: Inkstrim's brand is a dark, high-contrast
   look by default. Like the n0idols site this pattern was proven on,
   :root here holds the LIGHT variant and [data-theme="dark"] holds
   the site's actual default look — the head init script sets
   DEFAULT_THEME = 'dark' so visitors land there first unless they've
   saved a light preference before, or their OS prefers light. This
   keeps every core.css on the pattern the same shape; only which
   block a visitor sees FIRST differs, via JS, not CSS structure.

   NOTE — FOOTER: matches current live behavior exactly — the footer
   is built from --color-bg-deep and --fg-rgb, both of which flip
   with the theme, so it goes charcoal <-> white right along with
   the rest of the page (same footer pattern as the n0idols build,
   after that correction).

   NOTE — ACCENT COLOR: Inkstrim's brand is genuinely single-accent
   (teal only — no second brand color the way n0idols has green+mint).
   --accent2 is defined as an alias of --accent1 rather than a second
   hue, so any shared core/mod rule that references --accent2 (glows,
   the .highlight wordmark letter, etc.) still renders as the same
   solid teal the site uses today, instead of introducing an
   unrequested second color.

   TO RETHEME A NEW SITE FROM THIS FILE: edit the :root block below,
   then the [data-theme="dark"] override block. Nothing else in
   core.css or any mod file should need a color changed directly.
================================================================ */

:root {
  /* ---- Brand color — single teal accent, see NOTE above ---- */
  --accent1:        #008080;
  --accent1-dark:   #005f5f;
  --accent1-deep:   #003f3f;   /* spare deep-teal token — not currently used by any core rule or mod, kept for parity with the shared token set */
  --accent2:        var(--accent1);
  --accent2-soft:   #d6ecec;
  --ink:            #111111;
  --paper:          #ffffff;
  --accent1-rgb:      0, 128, 128;
  --accent2-rgb:      0, 128, 128;
  --accent1-glow:   rgba(var(--accent1-rgb), 0.3);
  --accent2-glow:   rgba(var(--accent2-rgb), 0.3);

  /* ---- Surfaces (LIGHT variant — see NOTE above) ---- */
  --color-bg:          #f5f5f5;
  --color-bg-alt:      #ececea;
  --color-bg-deep:     #ffffff;
  --color-card:        #ffffff;
  --color-card-light:  #ececea;
  --color-border:      rgba(17, 17, 17, 0.08);

  /* ---- Semantic text tokens (theme-driven, do not hardcode) ---- */
  --fg-rgb:            17, 17, 17;
  --text-color:        #111111;
  --navbar-bg:         rgba(255, 255, 255, 0.9);
  --navbar-bg-solid:   rgba(255, 255, 255, 0.97);   /* mobile dropdown — a touch more opaque */
  --border-2:          var(--color-border);

  /* ---- Fonts ---- */
  --font-display:      'Oswald', sans-serif;
  --font-body:         'Inter', sans-serif;

  /* ---- Elevation ---- */
  --shadow-sm:         0 4px 12px rgba(0,0,0,0.3);
  --shadow-card:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-hover:      0 16px 48px rgba(0,0,0,0.65);
  --shadow-glow:       0 0 32px var(--accent1-glow);

  --radius-sm:         6px;
  --radius-md:         12px;
  --radius-lg:         20px;

  --transition:        0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Fluid section spacing — replaces the old fixed
     96px/24px + a --section-pad-sm breakpoint override with one
     clamp() so padding scales continuously instead of snapping
     at 680px. See the flag in chat before this file was built. */
  --section-pad:       clamp(56px, 9vw, 96px) clamp(16px, 5vw, 24px);
}

/* ================================================================
   DARK THEME (Inkstrim's actual default look)
   Toggled by setting data-theme="dark" on <html> — see the inline
   head script for the flash-free early read, and core.js for the
   toggle button. Only the tokens below need to change; every color
   elsewhere in the sheet (or any mod) is built from these variables
   (or from --fg-rgb), so the whole site re-themes from this block.
================================================================ */
[data-theme="dark"] {
  --color-bg:          #1a1a1a;
  --color-bg-alt:      #1a1a1a;
  --color-bg-deep:     #111111;
  --color-card:        #2c2c2c;
  --color-card-light:  #3a3a3a;
  --color-border:      rgba(255, 255, 255, 0.06);
  --border-2:          var(--color-border);

  --shadow-sm:         0 4px 12px rgba(0,0,0,0.3);
  --shadow-card:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-hover:      0 16px 48px rgba(0,0,0,0.65);

  --fg-rgb:            255, 255, 255;
  --text-color:        #ffffff;
  --navbar-bg:         rgba(17, 17, 17, 0.92);
  --navbar-bg-solid:   rgba(17, 17, 17, 0.97);
}

* { transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease; }

/* ================================================================
   RESET & BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
body.nav-open { overflow: hidden; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---- Visible keyboard focus (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Shared section-header utility classes (used by every mod) ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent1);
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-color);
}

.accent-bar {
  width: 52px;
  height: 3px;
  background: var(--accent1);
  border-radius: 2px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}

/* ================================================================
   NAV BAR
================================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.06);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

/* Groups the nav links, theme toggle, and hamburger on the right so
   .navbar keeps a clean 2-item space-between layout (brand | controls)
   regardless of which of those three are visible at a given width. */
.navbar-controls { display: flex; align-items: center; gap: 20px; }

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color);
  text-decoration: none;
  text-shadow: 0 0 20px var(--accent1-glow);
}
.navbar-brand .highlight { color: var(--accent1); }
.navbar-brand .logo-img { height: 36px; width: auto; display: block; }

.navbar-links { display: flex; list-style: none; gap: 32px; align-items: center; }
.navbar-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.65);
  text-decoration: none;
  transition: color var(--transition);
}
.navbar-links a:hover { color: var(--accent1); }
.navbar-links a.is-active { color: var(--accent1); }

/* "Switch service" pill link — unique to Inkstrim's two-service
   structure (roofing.html <-> remodeling.html). Harmless on any
   page that doesn't use it (index.html's portal doesn't). */
.navbar-switch {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid var(--accent1);
  border-radius: var(--radius-sm);
  color: var(--accent1) !important;
  font-size: 0.78rem !important;
  transition: background var(--transition), color var(--transition) !important;
}
.navbar-switch:hover { background: var(--accent1); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(var(--fg-rgb), 0.06); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Theme toggle button ---- */
.theme-toggle {
  width: 44px; height: 44px; /* 44px = touch-friendly minimum */
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-card);
  border: 1px solid var(--border-2);
  color: var(--accent1);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover { transform: translateY(-2px) rotate(12deg); box-shadow: var(--shadow-card); border-color: var(--accent1); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent1); outline-offset: 3px; }
.theme-toggle .theme-icon-dark  { display: inline; }
.theme-toggle .theme-icon-light { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-dark  { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-light { display: inline; }

/* ================================================================
   HERO
   .hero-bg's background-image is set per page (different photo on
   roofing.html vs remodeling.html) — that's the one bit of CSS each
   sub-page still carries in its own small <style> block, since it's
   the only thing about the hero that isn't shared.
================================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  display: flex; align-items: center; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 5%;
  filter: brightness(0.4) saturate(0.75);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, var(--accent1-glow) 60%, rgba(0,0,0,0.2) 100%);
}
[data-theme="light"] .hero-overlay { background: linear-gradient(0deg, rgba(210,210,210,0.5) 0%, var(--accent1-glow) 30%, rgba(0,0,0,0.2) 60%); }

.hero-content { position: relative; z-index: 2; max-width: 680px; padding: 0 40px; animation: heroFadeIn 1s 0.2s ease both; }

.hero-eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent1);
  margin-bottom: 18px; display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.0;
  margin-bottom: 24px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.7), 0 0 80px var(--accent1-glow);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; animation: bounce 2s infinite;
}
.hero-scroll::after { content: ''; display: block; width: 1px; height: 36px; background: linear-gradient(to bottom, var(--accent1), transparent); }

/* ================================================================
   BUTTONS
================================================================ */
.btn-primary {
  display: inline-block; padding: 14px 36px;
  background: var(--accent1); color: var(--paper);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 4px 20px var(--accent1-glow);
}
.btn-primary:hover { background: var(--accent1-dark); box-shadow: 0 8px 32px var(--accent1-glow); transform: translateY(-2px); }

.btn-ghost {
  display: inline-block; padding: 14px 36px;
  background: transparent; color: var(--paper);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius-sm); border: 1.5px solid rgba(255,255,255,0.4);
  cursor: pointer; transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-ghost:hover { border-color: var(--paper); background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* ================================================================
   FOOTER
   NOTE: background is --color-bg-deep and text uses --fg-rgb, both
   of which flip with the theme — footer goes charcoal <-> white
   right along with the rest of the page, matching current behavior.
================================================================ */
.site-footer { background: var(--color-bg-deep); border-top: 1px solid rgba(var(--fg-rgb),0.06); padding: 40px 24px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--fg-rgb), 0.5); }
.footer-brand .highlight { color: var(--accent1); }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.78rem; color: rgba(var(--fg-rgb), 0.35); text-decoration: none; letter-spacing: 0.08em; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent1); }
.footer-copy { font-size: 0.75rem; color: rgba(var(--fg-rgb), 0.4); text-align: right; }

.footer-bottom {
  max-width: 1100px; margin: 20px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border-2);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-legal { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-legal a { font-size: 0.72rem; color: rgba(var(--fg-rgb), 0.5); text-decoration: none; transition: color var(--transition); }
.footer-legal a:hover { color: var(--accent1); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(var(--fg-rgb), 0.08); border: 1px solid rgba(var(--fg-rgb), 0.14);
  display: flex; align-items: center; justify-content: center;
  color: rgba(var(--fg-rgb), 0.7); text-decoration: none; font-size: 0.95rem;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.footer-social a:hover { color: var(--accent1); border-color: var(--accent1); transform: translateY(-2px); }

/* ================================================================
   SCROLL REVEAL
================================================================ */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes heroFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================================================================
   RESPONSIVE — core sections only
================================================================ */
@media (max-width: 1000px) {
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navbar-bg-solid); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border-2);
  }
  .nav-toggle { display: flex; }
}
@media (max-width: 960px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-copy { text-align: center; }
  .footer-links { flex-direction: column; align-items: center; gap: 14px; }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
  .footer-legal { justify-content: center; }
  .footer-social { justify-content: center; }
}
@media (max-width: 680px) {
  .hero-content { padding: 0 24px; }
}