:root {
  --night: #100720;
  --plum: #1d0f38;
  --violet: #7c4dff;
  --amethyst: #a78bfa;
  --lilac: #d2c2ff;
  --moon: #f7f1ff;
  --candle: #ffd9ad;
  --rose: #ffc4e1;
  --mist: rgba(247, 241, 255, 0.7);
  --haze: rgba(247, 241, 255, 0.44);
  --glass: rgba(255, 244, 250, 0.06);
  --glass-edge: rgba(255, 236, 246, 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text",
    "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: 1080px;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--night);
  color: var(--moon);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Sky: plum night with a warm glow near the horizon */
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -2;
  background:
    radial-gradient(1100px 680px at 74% -8%, rgba(108, 58, 204, 0.6), transparent 62%),
    radial-gradient(820px 620px at 4% 30%, rgba(92, 34, 150, 0.5), transparent 64%),
    radial-gradient(900px 560px at 88% 78%, rgba(176, 62, 150, 0.3), transparent 64%),
    radial-gradient(1200px 520px at 30% 112%, rgba(255, 170, 120, 0.2), transparent 66%),
    linear-gradient(180deg, #100720 0%, #1a0d36 46%, #170a2a 100%);
}

#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--candle);
  outline-offset: 4px;
  border-radius: 14px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--moon);
  color: #24123f;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: rgba(19, 9, 38, 0.93);
  border-bottom: 1px solid rgba(255, 236, 246, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 6px;
  margin: 0 -12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--mist);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  transition: color 0.2s ease;
}

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(112px, 16vh, 164px) 0 clamp(16px, 2.75vh, 32px);
}

/* Fairy lights hanging under the navigation */
.lights {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 104px;
  margin-left: -50vw;
  overflow: hidden;
  pointer-events: none;
}

/* Fixed size and centred: wide screens show more bulbs instead of bigger ones */
.lights svg {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3600px;
  height: 104px;
  max-width: none;
  margin-left: -1800px;
}

.lights .cord {
  fill: none;
  stroke: rgba(255, 226, 214, 0.34);
  stroke-width: 1.3;
}

.lights .glow { will-change: opacity; }
.lights .glow-a { color: var(--candle); }
.lights .glow-b { color: var(--rose); }
.lights .glow-c { color: var(--lilac); }

.moon {
  position: relative;
  width: clamp(150px, 21vw, 216px);
  aspect-ratio: 1;
  margin: 0 auto clamp(32px, 5vh, 52px);
  will-change: transform;
  backface-visibility: hidden;
}

.moon::before {
  content: "";
  position: absolute;
  inset: -62%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 225, 0.3), rgba(167, 139, 250, 0.34) 34%, rgba(124, 77, 255, 0.12) 58%, transparent 76%);
}

.moon img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--plum);
  box-shadow:
    0 0 0 1px rgba(255, 244, 250, 0.28),
    0 0 0 10px rgba(255, 217, 173, 0.07),
    0 34px 90px -22px rgba(124, 77, 255, 0.85);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 10.4vw, 7.25rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 10%, #e6d9ff 52%, #b79cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.12em;
}

.lead {
  max-width: 36ch;
  margin: clamp(16px, 2.6vh, 26px) auto 0;
  font-size: clamp(1.14rem, 2.4vw, 1.6rem);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -0.016em;
  color: var(--mist);
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(28px, 4.6vh, 42px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}

.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:active { transform: scale(0.97); }

.btn-solid {
  background: linear-gradient(180deg, #ffffff, #f1e7ff);
  color: #24123f;
  box-shadow: 0 10px 34px -12px rgba(255, 217, 173, 0.55);
}

.btn-quiet {
  border: 1px solid rgba(255, 236, 246, 0.26);
  background: rgba(255, 244, 250, 0.04);
  color: var(--moon);
}

/* Sections */
.section { position: relative; padding: clamp(52px, 8.5vh, 100px) 0; }
.hero + .section { padding-top: clamp(14px, 2.1vh, 25px); }

h2 {
  margin: 0 0 clamp(24px, 4vh, 42px);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

/* Channel tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 212px;
  padding: 26px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.4s var(--ease), background-color 0.3s ease, border-color 0.3s ease;
}

/* Candle-light spot that follows the pointer */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 217, 173, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tile > * { position: relative; z-index: 1; }

.tile .glyph {
  width: 30px;
  height: 30px;
  fill: var(--lilac);
  margin-bottom: auto;
}

.tile .glyph.line {
  fill: none;
  stroke: var(--lilac);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile .glyph .dot { fill: var(--lilac); stroke: none; }

.tile h3 {
  margin: 28px 0 4px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.44;
  color: var(--mist);
}

.tile-main {
  grid-column: span 4;
  min-height: 300px;
  padding: 34px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255, 196, 225, 0.3), transparent 56%),
    linear-gradient(140deg, #7446ea 0%, #4d25a6 58%, #341874 100%);
  border-color: rgba(255, 244, 250, 0.22);
}

.tile-main .glyph { width: 40px; height: 40px; fill: #ffffff; }
.tile-main h3 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.032em; margin-bottom: 8px; }
.tile-main p { font-size: 1.12rem; color: rgba(255, 255, 255, 0.84); max-width: 36ch; }

.tile-side { min-height: 300px; }

/* The Cozy Corner: team artwork under the text */
.tile-cozy {
  grid-column: span 4;
  min-height: 300px;
  padding: 34px;
  justify-content: flex-end;
  background: #3a2230;
  border-color: rgba(255, 217, 173, 0.22);
}

.tile-cozy .tile-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 78%;
}

.tile-cozy::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(44, 20, 38, 0) 26%, rgba(44, 20, 38, 0.74) 58%, rgba(38, 16, 40, 0.92) 100%);
}

.tile-cozy .tile-body {
  z-index: 2;
  width: min(50%, 340px);
  margin-left: auto;
}

.tile-cozy h3 { margin-top: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; color: #fff3e4; }
.tile-cozy p { color: rgba(255, 243, 228, 0.86); font-size: 1.04rem; }

.tile-heart { min-height: 300px; }

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vh, 50px);
}

.statement {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.3vw, 2.9rem);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--haze);
}

.statement strong { color: var(--moon); font-weight: 600; }

.loves {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 4vw, 48px);
  margin: 0;
  padding: clamp(26px, 4vh, 38px) 0 0;
  border-top: 1px solid rgba(255, 236, 246, 0.13);
}

.loves dt {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.016em;
  margin-bottom: 6px;
  color: var(--candle);
}

.loves dd {
  margin: 0;
  color: var(--mist);
  font-size: 1rem;
  max-width: 34ch;
}

/* Constellations: cat, cup, cake and moon drawn into the sky */
.constellation {
  position: absolute;
  z-index: -1;
  width: clamp(84px, 16vw, 200px);
  aspect-ratio: 1;
  opacity: 0.8;
  overflow: visible;
  pointer-events: none;
  will-change: opacity;
}

.constellation .links {
  fill: none;
  stroke: rgba(210, 194, 255, 0.42);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.constellation circle { fill: var(--moon); }
.constellation .aura { fill: var(--candle); opacity: 0.16; }

.c-cat { top: clamp(118px, 17vh, 176px); left: 2%; }
.c-cup { top: clamp(118px, 17vh, 176px); right: 2%; }
.c-cake { top: -14px; right: 0; width: clamp(76px, 12vw, 150px); }
.c-moon { top: clamp(28px, 6vh, 70px); right: 4%; width: clamp(110px, 17vw, 210px); }

/* Café touches */
.cafe-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 4vw, 34px);
  padding: clamp(4px, 1vh, 12px) 0;
}

.cafe-icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cafe-row .cafe-icon { color: rgba(255, 217, 173, 0.5); }
.cafe-row .cafe-icon:nth-child(2n) { color: rgba(210, 194, 255, 0.5); }

.loves dt { display: flex; align-items: center; gap: 10px; }
.loves dt .cafe-icon { width: 22px; height: 22px; }

.sign { display: inline-flex; align-items: center; gap: 10px; }
.sign .cafe-icon { width: 18px; height: 18px; color: var(--candle); }

/* Footer */
.foot {
  margin-top: clamp(36px, 6vh, 72px);
  border-top: 1px solid rgba(255, 236, 246, 0.09);
  padding: 24px 0 calc(34px + env(safe-area-inset-bottom));
  font-size: 0.86rem;
  color: var(--haze);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 28px;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mist);
}

/* Legal and message pages */
.legal { padding: clamp(52px, 10vh, 108px) 0 clamp(36px, 7vh, 68px); }
.legal h1 { font-size: clamp(2.4rem, 8vw, 5rem); }
.legal .lead { margin-inline: 0; }
.legal .actions { justify-content: flex-start; }

.legal-card {
  margin-top: clamp(28px, 5vh, 46px);
  max-width: 640px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 32px;
  background: rgba(40, 22, 70, 0.72);
  border: 1px solid var(--glass-edge);
}

.legal-card h2 {
  font-size: 1.18rem;
  letter-spacing: -0.016em;
  line-height: 1.3;
  margin: 28px 0 8px;
  color: var(--candle);
}
.legal-card h2:first-child { margin-top: 0; }

.legal-card p,
.legal-card address {
  margin: 0;
  font-style: normal;
  color: var(--mist);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.legal-card a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; }

/* Hover only where a real pointer exists, so touch screens get no sticky states */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--moon); }
  .btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 217, 173, 0.7); }
  .btn-quiet:hover { border-color: rgba(255, 236, 246, 0.55); background: rgba(255, 244, 250, 0.09); }
  .tile:hover { transform: translateY(-5px); background-color: rgba(255, 244, 250, 0.1); border-color: rgba(255, 226, 214, 0.3); }
  .tile:hover::after { opacity: 1; }
  .tile-main:hover { border-color: rgba(255, 244, 250, 0.42); }
  .tile-cozy:hover { background-color: #3a2230; border-color: rgba(255, 217, 173, 0.5); }
  .foot a:hover { color: var(--moon); text-decoration: underline; text-underline-offset: 3px; }
}

.tile:active { transform: scale(0.985); }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  /* One load moment: the moon rises, the name follows */
  .moon { animation: rise 1.5s var(--ease) both, drift 3.2s ease-in-out 1.5s infinite alternate; }
  .hero h1 { animation: settle 1.2s var(--ease) 0.25s both; }
  .hero .lead,
  .hero .actions { animation: settle 1.2s var(--ease) 0.45s both; }
  .lights { animation: fade 1.6s ease 0.6s both; }

  /* Three whole layers cross-fade, so the bulbs never have to be repainted */
  .lights .glow-a { animation: glimmer 5.2s ease-in-out infinite; }
  .lights .glow-b { animation: glimmer 6.3s ease-in-out -1.7s infinite; }
  .lights .glow-c { animation: glimmer 4.4s ease-in-out -3.1s infinite; }

  .constellation { animation: shimmer 7s ease-in-out infinite alternate; }
  .c-cup { animation-delay: -2.4s; animation-duration: 8.2s; }
  .c-cake { animation-delay: -4.1s; animation-duration: 6.4s; }
  .c-moon { animation-delay: -1.2s; animation-duration: 9s; }

  /* Scroll reveal, only armed once the script is running */
  .js [data-reveal] { opacity: 0; transform: translateY(24px); }
  .js [data-reveal].in {
    opacity: 1;
    transform: none;
    transition: opacity 0.9s var(--ease) var(--delay, 0ms), transform 0.9s var(--ease) var(--delay, 0ms);
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(64px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* The tiny rotation keeps the layer from snapping to whole pixels while it floats */
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0.01deg); }
  to { transform: translate3d(0, -14px, 0) rotate(0.01deg); }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  from { opacity: 0.5; }
  to { opacity: 0.95; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glimmer {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.5; }
  60% { opacity: 0.82; }
}

@media (max-width: 860px) {
  .tile { grid-column: span 3; }
  .tile-main,
  .tile-cozy { grid-column: span 6; }
  .tile-side,
  .tile-heart { grid-column: span 6; min-height: 0; }
  .tile-side .glyph,
  .tile-heart .glyph { margin-bottom: 26px; }
  .tile-side h3,
  .tile-heart h3 { margin-top: 0; }
  .tiles > .tile:nth-child(5) { grid-column: span 6; min-height: 0; }
  .tiles > .tile:nth-child(5) .glyph { margin-bottom: 26px; }
  .tiles > .tile:nth-child(5) h3 { margin-top: 0; }
}

@media (max-width: 600px) {
  .nav-links .optional { display: none; }
  .hero { padding-top: 112px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .tiles > .tile,
  .tiles > .tile:nth-child(5) { grid-column: auto; min-height: 0; padding: 24px; border-radius: 28px; }
  .tiles > .tile-main { min-height: 232px; padding: 28px; }
  .tile .glyph { margin-bottom: 24px; }
  .tile h3 { margin-top: 0; }
  .tile-main .glyph { margin-bottom: auto; }
  .tile-main h3 { margin-top: 28px; }

  /* Cozy Corner stacks: artwork on top, text below */
  .tiles > .tile-cozy { padding: 0; }
  .tile-cozy .tile-art {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 16 / 10;
    object-position: 0% 100%;
  }
  .tile-cozy::before { display: none; }
  .tile-cozy .tile-body { width: auto; margin: 0; padding: 20px 24px 24px; }

  .loves { grid-template-columns: 1fr; }
  .c-cat { left: -6px; }
  .c-cup { right: -6px; }
  .c-cake { top: -30px; width: 58px; }
  .c-moon { position: relative; top: auto; right: auto; display: block; margin: 0 auto 22px; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .btn { transition: none; }
}
