/* =========================================================
   Clockwork: global design system
   Concept: a watch movement. Deep violet case, one lime "luminous
   hand", condensed engraved numerals, round dials and tick tracks.
   Palette: violet #1D1033, lime #C9F23A, mist #F3F1F8.
   Shapes: circles and pills (no sharp corners, no hard shadows).
   ========================================================= */

:root {
  /* Color tokens */
  --violet-950: #150B27;
  --violet-900: #1D1033;
  --violet-800: #2A1750;
  --violet-700: #3B2272;
  --violet-600: #5B3BB0;
  --violet-100: #E9E4F6;
  --mist: #F3F1F8;
  --mist-dim: #E9E6F2;
  --lime: #C9F23A;
  --lime-dark: #A9D116;
  --lime-soft: #EAFA9E;
  --ink: #1D1033;
  --ink-soft: #4B4264;
  --ink-faint: #6A6286;
  --on-dark: #D9D3EA;
  --on-dark-dim: #A79EC4;
  --border-soft: rgba(29, 16, 51, 0.14);
  --border-on-dark: rgba(243, 241, 248, 0.16);

  /* Type */
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --max-width: 1160px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --pill: 999px;

  --shadow-card: 0 1px 2px rgba(29, 16, 51, 0.06), 0 10px 26px -14px rgba(29, 16, 51, 0.28);
  --shadow-lift: 0 2px 4px rgba(29, 16, 51, 0.08), 0 18px 34px -16px rgba(91, 59, 176, 0.38);

  /* Tick track used as a divider / ruler */
  --ticks: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 10px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 0.5em; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.005em;
}
h1 { font-weight: 900; }
h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; line-height: 1.3; font-family: var(--font-body); }

p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

a { color: var(--violet-600); text-decoration: none; }
a:hover { color: var(--violet-800); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--violet-600);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* -------------------- Skip link -------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--lime);
  color: var(--ink);
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* -------------------- Header: light, with a tick track along the bottom -------------------- */
.site-header {
  background: rgba(243, 241, 248, 0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
  color: var(--ink);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  color: rgba(29, 16, 51, 0.32);
  background: var(--ticks);
  -webkit-mask: linear-gradient(0deg, #000 0 100%);
}
.site-header .container {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.site-logo { display: flex; align-items: center; min-height: 44px; min-width: 0; flex-shrink: 0; }
.site-logo__img { height: 38px; width: auto; display: block; }

.site-nav__list {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 0.3rem;
  align-items: center;
}
.site-nav__list a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav__list a:hover { background: var(--violet-100); color: var(--violet-800); }
.site-nav__list a.active { background: var(--lime); color: var(--ink); }

.site-nav__cta {
  display: none;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lime);
  background: var(--violet-900);
  padding: 0.65rem 1.15rem;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.site-nav__cta:hover { background: var(--violet-700); color: var(--lime); transform: translateY(-1px); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  background: var(--violet-900);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.nav-toggle svg { stroke: var(--lime); }

@media (min-width: 960px) {
  .site-nav__cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile nav panel: a full dark face with big engraved links */
.site-nav {
  /* backdrop-filter on the header makes it the containing block of fixed children, so the height is explicit */
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  height: calc(100vh - 74px);
  height: calc(100dvh - 74px);
  background: var(--violet-950);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow-y: auto;
}
.site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.site-nav__inner { padding: 1.5rem 1.5rem 3rem; }
.site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
.site-nav__list a {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--on-dark);
  padding: 0.7rem 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-on-dark);
}
.site-nav__list a:hover { background: transparent; color: var(--lime); }
.site-nav__list a.active { background: transparent; color: var(--lime); }
@media (min-width: 960px) {
  .site-nav { position: static; height: auto; opacity: 1; pointer-events: auto; transform: none; background: transparent; overflow: visible; display: flex; align-items: center; }
  .site-nav__inner { padding: 0; display: contents; }
  .site-nav__list { flex-direction: row; align-items: center; gap: 0.3rem; }
  .site-nav__list a { font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink-soft); padding: 0.5rem 0.95rem; border-radius: var(--pill); border-bottom: 0; }
  .site-nav__list a:hover { background: var(--violet-100); color: var(--violet-800); }
  .site-nav__list a.active { background: var(--lime); color: var(--ink); }
}

/* -------------------- Footer: dark violet with a watermark -------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--violet-950);
  color: var(--on-dark);
  padding: 3.6rem 0 2.2rem;
  margin-top: 4.5rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 6px;
  color: rgba(201, 242, 58, 0.55);
  background: var(--ticks);
}
.site-footer::after {
  content: "CLOCKWORK";
  position: absolute;
  left: 50%;
  bottom: -0.18em;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 21vw, 17rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(243, 241, 248, 0.04);
  white-space: nowrap;
  pointer-events: none;
}
.site-footer .container { position: relative; z-index: 1; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-grid--home { grid-template-columns: 1.3fr 1fr; }
}
.footer-logo { display: inline-block; padding: 0.45rem 0; margin-bottom: 0.6rem; }
.footer-logo img { height: 38px; width: auto; }
.footer-brand p { color: var(--on-dark-dim); font-size: 0.93rem; max-width: 36ch; }
.footer-col h4 {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; font-size: 0.94rem; overflow-wrap: anywhere; }
.footer-col li { padding: 0; }
.footer-col li a { display: inline-block; padding: 0.65rem 0; }
.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-on-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--on-dark-dim);
}
.footer-bottom a { color: var(--on-dark-dim); display: inline-block; padding: 0.7rem 0.1rem; }
.footer-bottom a:hover { color: var(--lime); }
.site-footer { padding-bottom: 6.5rem; }
@media (min-width: 960px) { .site-footer { padding-bottom: 2.6rem; } }

/* -------------------- Call button for phones (floating dial) -------------------- */
.call-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 0 6px rgba(201, 242, 58, 0.28), 0 14px 28px -8px rgba(29, 16, 51, 0.55);
  transition: transform 0.15s ease;
}
.call-fab:hover { color: var(--ink); transform: scale(1.06); }
.call-fab svg { width: 26px; height: 26px; }
.call-fab__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 960px) { .call-fab { display: none; } }

/* -------------------- Generic content typography -------------------- */
main { display: block; }
.prose { padding: 2.5rem 0 3rem; }
.prose h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
.prose h2 { margin-top: 0; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { text-decoration: underline; text-decoration-color: var(--lime-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Divider between major sections: a tick track with a small dial in the middle */
.gauge-divider { display: flex; align-items: center; gap: 0.9rem; margin: 0; padding: 0; color: rgba(29, 16, 51, 0.3); }
.gauge-divider::before,
.gauge-divider::after { content: ""; height: 8px; flex: 1; background: var(--ticks); }
.gauge-divider svg { flex-shrink: 0; }

/* Buttons: pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.97rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--violet-900); color: var(--lime); }
.btn-primary:hover { background: var(--violet-700); color: var(--lime); }
.btn-ghost-dark { background: transparent; color: var(--on-dark); border-color: rgba(243, 241, 248, 0.45); }
.btn-ghost-dark:hover { color: var(--lime); border-color: var(--lime); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--lime); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
