/* The Sassoons — shared family design system.
   Same tokens and components as harrysassoon.com, jarvis.sassoon.uk, martha.sassoon.uk. */

:root {
  --bg: #fdf9ee;
  --bg-2: #f9f3e3;
  --ink: #0a0e1f;
  --ink-2: #2a2e45;
  --muted: #6b6f82;
  --muted-2: #9a9ea8;
  --blue: #1d4ed8;
  --blue-deep: #1e3a8a;
  --blue-tint: #e0e7ff;
  --teal: #0d9488;
  --rose: #e11d48;
  --glass: rgba(255, 253, 247, 0.55);
  --glass-border: rgba(255, 255, 255, 0.75);
  --rule: rgba(10, 14, 31, 0.08);
  --pill-bg: rgba(255, 255, 255, 0.5);
  color-scheme: light;
}

/* Dark theme — applied via .is-dark class on <html>. */
.is-dark {
  --bg: #0e1118;
  --bg-2: #161a24;
  --ink: #e6e8f0;
  --ink-2: #b4b8c6;
  --muted: #808898;
  --muted-2: #5a6072;
  --blue: #7ea3d8;
  --blue-deep: #9bb6dc;
  --blue-tint: #1c2540;
  --teal: #56b8ad;
  --rose: #d97d92;
  --glass: rgba(24, 28, 40, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --rule: rgba(230, 232, 240, 0.1);
  --pill-bg: rgba(255, 255, 255, 0.07);
  color-scheme: dark;
}

.is-dark .blob-1 { opacity: 0.14; }
.is-dark .blob-2 { opacity: 0.12; }
.is-dark .blob-3 { opacity: 0.08; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Host Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* gradient blobs */
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.blob-1 {
  width: 60vw; height: 60vw;
  background: var(--blue);
  top: -18vw; left: -12vw;
  opacity: 0.42;
  animation: drift1 22s ease-in-out infinite;
}

.blob-2 {
  width: 48vw; height: 48vw;
  background: var(--teal);
  bottom: -14vw; right: -10vw;
  opacity: 0.38;
  animation: drift2 28s ease-in-out infinite;
}

.blob-3 {
  width: 36vw; height: 36vw;
  background: var(--rose);
  top: 30%; left: 45%;
  opacity: 0.22;
  animation: drift3 34s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vw, 6vw) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vw, -10vw) scale(1.05); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vw, 8vw) scale(0.92); }
}

/* grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.page {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 28px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: center;
  padding-bottom: 24px;
}
.sound-toggle {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  border-radius: 100px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sound-toggle:hover { color: var(--blue); border-color: var(--blue); }
.sound-toggle:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- hero ---------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 4px 48px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  border-radius: 100px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.name {
  font-family: "Host Grotesk", sans-serif;
  font-size: clamp(46px, 12vw, 160px);
  line-height: 0.88;
  font-weight: 600;
  letter-spacing: -0.055em;
  color: var(--ink);
  white-space: nowrap;
}
.name .it {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -0.035em;
}
.name .dot { color: var(--ink); }

/* tagline with animated caret */
.tagline {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: clamp(17px, 2.6vw, 22px);
  color: var(--ink-2);
  margin-top: 28px;
  line-height: 1.35;
  max-width: 36ch;
}
.tagline::after {
  content: '▌';
  color: var(--blue);
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* buttons — phone extension style */
.buttons {
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 440px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
  overflow: hidden;
}

/* paw cursor on hover */
.btn:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='24' font-size='22'%3E%F0%9F%90%BE%3C/text%3E%3C/svg%3E") 16 16, pointer;
}

/* EXT badge */
.btn .ext {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  transition: color 220ms ease, opacity 220ms ease;
  flex-shrink: 0;
}

/* arrow and phone icon transitions */
.btn .arrow {
  display: inline-block;
  transition: opacity 200ms ease, transform 240ms cubic-bezier(.2,.8,.2,1);
}
.btn .phone-ic {
  position: absolute;
  right: 18px;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* hover — shared blue, matching the pill hover on the other family sites */
.btn:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  transform: translateY(-2px);
}
.btn:hover .arrow   { opacity: 0; transform: translateX(3px); }
.btn:hover .phone-ic { opacity: 1; }
.btn:hover .ext     { color: #fff; opacity: 0.75; }

/* ---------- footer ---------- */
footer {
  margin-top: 24px;
  padding: 16px 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  align-self: center;
}

footer .copyright {
  display: flex;
  align-items: center;
  gap: 8px;
}

footer .copyright::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-block;
}

footer .divider {
  width: 1px;
  height: 14px;
  background: var(--rule);
}

footer .footer-link {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.18s ease;
}
footer .footer-link:hover { color: var(--ink); }

/* Theme toggle */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 2px 4px;
  margin: -4px 0;
  font-family: "Host Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 100px;
  transition: color 0.18s ease, background 0.18s ease;
  line-height: 1;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}
.theme-toggle .theme-icon-sun  { display: none; }
.theme-toggle .theme-icon-moon { display: block; }
.is-dark .theme-toggle .theme-icon-sun  { display: block; }
.is-dark .theme-toggle .theme-icon-moon { display: none; }

/* Theme toggle pinned top-right */
.theme-toggle--top {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  margin: 0;
  padding: 10px 14px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
}
.theme-toggle--top svg { width: 15px; height: 15px; }
@media (max-width: 540px) {
  .theme-toggle--top { top: 10px; right: 10px; padding: 9px 12px; }
}

::selection { background: var(--blue); color: white; }

/* ---------- 404 modal (Rebekah) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 31, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 100;
  opacity: 0;
  transition: opacity 240ms ease;
}
.modal-backdrop.open { opacity: 1; }
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 40px 32px 36px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(10, 14, 31, 0.28);
  position: relative;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}
.modal-backdrop.open .modal { transform: none; }

.modal-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: var(--pill-bg);
  border: 1px solid var(--rule);
  border-radius: 100px;
  margin-bottom: 22px;
}
.modal-eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.modal-title {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 6.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--blue);
  margin-bottom: 18px;
}
.modal-body {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 auto 28px;
  max-width: 32ch;
}
.modal .btn {
  min-width: 160px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.modal-actions .btn[hidden] { display: none; }
/* The cats' "visit the site" call-to-action stands out from the dismiss button. */
.modal-visit {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* entrance animation, soft */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.topbar  { animation: fadeUp 0.7s ease 0.04s backwards; }
.eyebrow { animation: fadeUp 0.8s ease 0.08s backwards; }
.name    { animation: fadeUp 0.8s ease 0.18s backwards; }
.tagline { animation: fadeUp 0.8s ease 0.30s backwards; }
.buttons .btn:nth-child(1) { animation: fadeUp 0.8s ease 0.42s backwards; }
.buttons .btn:nth-child(2) { animation: fadeUp 0.8s ease 0.50s backwards; }
.buttons .btn:nth-child(3) { animation: fadeUp 0.8s ease 0.58s backwards; }
.buttons .btn:nth-child(4) { animation: fadeUp 0.8s ease 0.66s backwards; }
footer   { animation: fadeUp 0.7s ease 0.80s backwards; }

/* cat rain keyframe */
@keyframes catFall {
  from { transform: translateY(-60px) rotate(0deg); opacity: 1; }
  to   { transform: translateY(110vh) rotate(360deg); opacity: 0.8; }
}
.cat-rain {
  position: fixed;
  top: -60px;
  pointer-events: none;
  z-index: 9999;
  animation: catFall linear forwards;
  user-select: none;
}

/* mobile */
@media (max-width: 900px) {
  .page { padding: 18px 16px 20px; }
  main { padding: 10px 2px 32px; }
  footer {
    padding: 12px 18px;
    font-size: 10px;
    margin-top: 16px;
    gap: 12px;
  }
}

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