/* ============================================================
   Solas Media — token system
   "Solas" is Gaelic for light. Strict monochrome, light theme:
   the glow now reads as a soft grey ambient shadow against white,
   rather than a glow against black — brightness and contrast only,
   no hue anywhere on the page.
   ============================================================ */
:root {
  /* -- color -- */
  --color-bg:          #ffffff; /* base: white */
  --color-panel:       #fafafa; /* about/footer panel, subtle off-white */
  --color-text:        #111111; /* near-black, primary text */
  --color-text-muted:  #5a5a5a; /* secondary grey, 6.5:1+ on white and panel */
  --color-ink:         #111111; /* primary text on panels (kept distinct for future use) */
  --color-ink-muted:   #6b6b6b; /* meets 4.5:1 on --color-panel, footer copy */
  --color-accent:      #9a9a9a; /* eyebrow labels / hairline-adjacent text */
  --color-accent-soft: #0a0a0a; /* ink-black — hero headline + invert-fill hover */
  --color-border:      #e5e5e5; /* hairlines / borders */
  --color-border-dark: rgba(0, 0, 0, 0.14);

  /* -- type -- */
  --font-display: 'Space Grotesk', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', 'Courier New', monospace;

  /* -- rhythm -- */
  --max-width: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

/* Visible keyboard focus everywhere interactive — kept in addition to
   each element's own hover/focus treatment below, never removed */
a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo-link {
  display: inline-block;
  line-height: 0;
  border-radius: 2px;
}
.logo {
  height: 30px;
  width: auto;
  /* source mark is solid black on transparent — reads correctly as-is on white */
}
.header-cta {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 0.5rem 0.25rem;
  transition: color 180ms ease;
}
/* underline draws in left-to-right on hover/focus */
.header-cta::after {
  content: '';
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0.4rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.header-cta:hover,
.header-cta:focus-visible { color: var(--color-text); }
.header-cta:hover::after,
.header-cta:focus-visible::after { transform: scaleX(1); }

/* ============================================================
   Hero — the one signature moment ("Ignition")
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100svh - 70px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2rem var(--gutter) 4rem;
}

/* Ambient light source: switches on once, then drifts gently
   with the cursor via --glow-x / --glow-y, set in script.js */
.hero-glow {
  --glow-x: 62%;
  --glow-y: 38%;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    38rem circle at var(--glow-x) var(--glow-y),
    rgba(10, 10, 10, 0.05) 0%,
    rgba(10, 10, 10, 0.025) 32%,
    transparent 68%
  );
  opacity: 0;
  animation: ignite 2.2s ease-out 0.15s forwards;
  transition: background-position 0.6s ease-out;
  will-change: opacity;
}

@keyframes ignite {
  0%   { opacity: 0; }
  55%  { opacity: 0.9; }
  75%  { opacity: 0.55; }
  100% { opacity: 0.75; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-accent-soft);
  max-width: 20ch;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 38ch;
  font-size: 1.08rem;
  color: var(--color-text-muted);
}

.hero-link {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text);
  padding: 0.75rem 1rem 0.75rem 0.25rem;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  transition: color 180ms ease, border-color 180ms ease;
}
/* tactile invert: a solid fill slides in behind the label on hover/focus */
.hero-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.hero-link:hover,
.hero-link:focus-visible {
  color: #ffffff;
  border-color: var(--color-accent-soft);
}
.hero-link:hover::before,
.hero-link:focus-visible::before { transform: scaleX(1); }
.hero-link-arrow { transition: transform 0.2s ease; }
.hero-link:hover .hero-link-arrow { transform: translateY(2px); }

/* ============================================================
   About
   ============================================================ */
.about {
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
}
.about-inner {
  max-width: 40rem;
  margin: 0 auto;
}
.eyebrow-dark { color: var(--color-accent); }

.about-lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.45;
  color: var(--color-text);
}

.about-body {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 34rem;
}

/* ============================================================
   Contact
   ============================================================ */
.contact {
  padding: clamp(5rem, 12vw, 8rem) var(--gutter);
}
.contact-inner {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}
.contact .eyebrow {
  font-weight: 500;
  color: var(--color-text);
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 2.25rem;
}
.contact-email {
  position: relative;
  z-index: 0;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 3.2vw, 1.5rem);
  color: var(--color-accent-soft);
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  min-height: 44px;
  overflow: hidden;
  transition: color 180ms ease, border-color 180ms ease;
}
/* same invert-fill language as the hero CTA, for a consistent hover system */
.contact-email::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
  border-radius: inherit;
}
.contact-email:hover,
.contact-email:focus-visible {
  color: #ffffff;
  border-color: var(--color-accent-soft);
}
.contact-email:hover::before,
.contact-email:focus-visible::before { transform: scaleX(1); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-panel);
  padding: 2.5rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.footer-email {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  transition: color 180ms ease;
}
.footer-email::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.footer-email:hover,
.footer-email:focus-visible { color: var(--color-text); }
.footer-email:hover::after,
.footer-email:focus-visible::after { transform: scaleX(1); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  margin-left: auto;
}

/* ============================================================
   Responsive — down to 375px
   ============================================================ */
@media (max-width: 640px) {
  .site-header { padding: 1.25rem 1.25rem; }
  .hero { padding: 1rem 1.25rem 3rem; min-height: calc(100svh - 64px); }
  .footer-copy { margin-left: 0; }
}

/* ============================================================
   Motion preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow {
    animation: none;
    opacity: 0.6;
    transition: none;
  }
  .hero-link-arrow { transition: none; }

  /* hover states still change on interaction, just instantly */
  .header-cta,
  .header-cta::after,
  .hero-link,
  .hero-link::before,
  .contact-email,
  .contact-email::before,
  .footer-email,
  .footer-email::after {
    transition: none;
  }
}
