/* ==========================================================================
   sbakerlaw.co.uk — S Baker Law Editorial Stylesheet
   ========================================================================== */

:root {
  --bg-obsidian: #050505;
  --text-primary: #f4f1ea;
  --text-secondary: #b7b2a6;
  --text-muted: #858077;
  --accent-gold: #d4af6a;
  --accent-gold-soft: rgba(212, 175, 106, 0.2);
  --accent-emerald: #63b995;
  --hairline: rgba(244, 241, 234, 0.14);
  --hairline-hover: rgba(212, 175, 106, 0.65);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

html, body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   1. Background Coffee Mug Photo & Scrim
   -------------------------------------------------------------------------- */
.bg-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-obsidian);
}

.bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  display: block;
}

.bg-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(5, 5, 5, 0.85) 0%,
    rgba(5, 5, 5, 0.45) 48%,
    rgba(5, 5, 5, 0) 66%
  );
}

/* --------------------------------------------------------------------------
   2. Page Shell & Header
   -------------------------------------------------------------------------- */
.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  max-width: 1480px;
  margin: 0 auto;
  padding: 2rem 3.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.brand-divider { color: var(--accent-gold); opacity: 0.75; }

.brand-sub {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav-toggle { display: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.is-current { color: var(--text-primary); }

.nav-contact-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--hairline);
}

.nav-email {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-decoration: none;
}

.nav-email:hover { text-decoration: underline; }

.copy-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}

.copy-btn:hover { border-color: var(--accent-gold); }

/* --------------------------------------------------------------------------
   3. Main Content & Single-Column Unnumbered Tool Links
   -------------------------------------------------------------------------- */
.main-content {
  max-width: 460px;
  margin: auto 0;
  padding: 1.5rem 0;
}

.tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.tool-item {
  border-top: 1px solid var(--hairline);
  transition: border-color 0.25s ease;
}

.tool-item:hover { border-top-color: var(--hairline-hover); }

.tool-link {
  display: flex;
  align-items: center;
  padding: 0.9rem 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, color 0.2s ease;
}

.tool-link:hover {
  transform: translateX(5px);
  color: var(--accent-gold);
}

.tool-title {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 500;
  line-height: 1.25;
  color: inherit;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tool-arrow {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tool-link:hover .tool-arrow { opacity: 1; }

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.48rem;
  border-radius: 4px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 106, 0.35);
}

/* --------------------------------------------------------------------------
   4. Footer & Copy Toast
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 241, 234, 0.08);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.footer-link { color: var(--text-secondary); text-decoration: none; }
.footer-link:hover { color: var(--text-primary); text-decoration: underline; }

.footer-email-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  background: #121215;
  color: var(--text-primary);
  border: 1px solid var(--accent-gold);
  border-radius: 6px;
  padding: 0.6rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.copy-toast.is-visible { opacity: 1; }

/* --------------------------------------------------------------------------
   5. Tablet & Mobile Adaptation (< 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .page-shell { padding: 1.5rem 2rem; }
  .main-content { max-width: 100%; }
}

@media (max-width: 767px) {
  .page-shell { padding: 1.15rem 1.25rem 1.5rem; }
  .brand-divider { display: none; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 11, 0.85);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-primary);
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.97);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .primary-nav.is-open { display: flex; }
  .nav-link { padding: 0.65rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nav-contact-group { border-left: none; padding-left: 0; padding-top: 0.5rem; justify-content: space-between; }

  .bg-photo {
    height: 46svh;
    object-fit: cover;
    object-position: 78% 75%;
  }

  .bg-scrim {
    background: linear-gradient(
      180deg,
      rgba(5, 5, 5, 0.35) 0%,
      rgba(5, 5, 5, 0) 16%,
      rgba(5, 5, 5, 0) 34%,
      rgba(5, 5, 5, 0.94) 46%
    );
  }

  .main-content { margin-top: 31svh; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-link { padding: 1.05rem 0.25rem; }
  .tool-title { font-size: 1.32rem; }
}
