/* ==========================================================
   LUMELICIOUS
   Compact day/night palette + responsive one-page composition
   ========================================================== */

@font-face {
  font-family: "Bodoni Moda Local";
  src: url("../fonts/BodoniModa-VariableFont_opsz,wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #F7F3EC;
  --bg-highlight: #FBF8F2;
  --bg-depth: #EFE7DC;
  --text: #1F1C19;
  --gold: #B5832E;

  --warm-rgb: 225, 167, 70;
  --page-pad: clamp(20px, 4vw, 64px);
  --transition: 500ms cubic-bezier(.2,.7,.2,1);
  --brand-font: "Bodoni Moda Local", "Bodoni Moda", Didot, "Bodoni MT", serif;
  --sans-font: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #03060D;
  --bg-highlight: #050A12;
  --bg-depth: #02050A;
  --text: #F5EFE5;
  --gold: #B5832E;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 19%, var(--bg-highlight) 0, transparent 38rem),
    linear-gradient(180deg, var(--bg-highlight) 0%, var(--bg) 58%, var(--bg-depth) 145%);
  font-family: var(--sans-font);
  transition: background var(--transition), color var(--transition);
}

button {
  font: inherit;
}

.landing {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  isolation: isolate;
}

.theme-toggle {
  position: fixed;
  z-index: 20;
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-highlight) 78%, transparent);
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:focus-visible,
.lamp-switch:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.theme-toggle__sun,
.theme-toggle__moon {
  width: 1em;
  line-height: 1;
  font-size: 15px;
  opacity: .72;
}

.theme-toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--text));
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 1px 8px rgba(181,131,46,.4);
  transition: transform var(--transition);
}

html[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(20px);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100svh - 58px);
  padding: 0 var(--page-pad) 28px;
}

.lamp-stage {
  position: relative;
  width: min(48vw, 590px);
  min-width: 310px;
  flex: 0 0 auto;
  margin-top: 0;
  filter: drop-shadow(0 20px 25px rgba(31,28,25,.06));
}

.lamp {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter var(--transition), opacity 220ms ease;
}

.lamp-glow {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 57%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.78);
  pointer-events: none;
  background:
    radial-gradient(circle,
      rgba(var(--warm-rgb), .48) 0%,
      rgba(var(--warm-rgb), .24) 28%,
      rgba(var(--warm-rgb), .10) 49%,
      transparent 72%);
  filter: blur(22px);
  transition: opacity 700ms ease, transform 900ms ease;
}

body.lamp-on .lamp-glow {
  opacity: .72;
  transform: translate(-50%, -50%) scale(1.22);
}

html[data-theme="dark"] body.lamp-on .lamp-glow {
  opacity: .98;
  transform: translate(-50%, -50%) scale(1.42);
  filter: blur(30px);
}

body.lamp-on .lamp {
  filter:
    drop-shadow(0 0 18px rgba(var(--warm-rgb), .18))
    drop-shadow(0 18px 35px rgba(var(--warm-rgb), .12));
}

html[data-theme="dark"] body.lamp-on .lamp {
  filter:
    drop-shadow(0 0 22px rgba(var(--warm-rgb), .38))
    drop-shadow(0 0 58px rgba(var(--warm-rgb), .22));
}

.lamp-switch {
  position: absolute;
  z-index: 5;
  right: -10%;
  bottom: 6%;
  width: clamp(76px, 19%, 116px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,.13));
  transition: transform 180ms ease, filter var(--transition);
}

.lamp-switch:hover {
  transform: translateY(-2px) scale(1.025);
}

.lamp-switch:active {
  transform: translateY(1px) scale(.985);
}

.lamp-switch img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.identity {
  position: relative;
  z-index: 4;
  width: min(100%, 1100px);
  margin-top: clamp(-44px, -3.3vw, -20px);
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--brand-font);
  font-size: clamp(70px, 10.8vw, 170px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.055em;
  text-rendering: optimizeLegibility;
  transition: color var(--transition), text-shadow var(--transition);
}

.descriptor {
  display: grid;
  grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  width: min(86%, 850px);
  margin: clamp(26px, 3vw, 38px) auto 0;
  color: var(--text);
  font-family: var(--brand-font);
  font-size: clamp(13px, 1.5vw, 21px);
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--transition), text-shadow var(--transition);
}

.descriptor__line,
.serving-line__dash {
  height: 1px;
  background: var(--gold);
  opacity: .9;
  box-shadow: 0 0 8px rgba(181,131,46,.08);
}

.serving-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: min(70%, 670px);
  margin: clamp(24px, 2.8vw, 38px) auto 0;
}

.serving-line p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 82%, var(--gold));
  font-family: var(--brand-font);
  font-size: clamp(13px, 1.25vw, 18px);
  font-style: italic;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: opacity 180ms ease, transform 180ms ease, color var(--transition), text-shadow var(--transition);
}

.serving-line p.is-changing {
  opacity: 0;
  transform: translateY(4px);
}

body.lamp-on h1,
body.lamp-on .descriptor,
body.lamp-on .serving-line p {
  text-shadow:
    0 0 16px rgba(var(--warm-rgb), .12),
    0 0 42px rgba(var(--warm-rgb), .06);
}

html[data-theme="dark"] body.lamp-on h1,
html[data-theme="dark"] body.lamp-on .descriptor,
html[data-theme="dark"] body.lamp-on .serving-line p {
  text-shadow:
    0 0 14px rgba(var(--warm-rgb), .24),
    0 0 38px rgba(var(--warm-rgb), .13);
}

footer {
  align-self: end;
  padding: 14px var(--page-pad) max(20px, env(safe-area-inset-bottom));
  color: color-mix(in srgb, var(--text) 58%, transparent);
  font-size: clamp(9px, .72vw, 11px);
  font-weight: 500;
  letter-spacing: .28em;
  text-align: center;
  text-transform: uppercase;
  transition: color var(--transition), text-shadow var(--transition);
}

body.lamp-on footer {
  text-shadow: 0 0 18px rgba(var(--warm-rgb), .08);
}

/* Medium/laptop heights: keep the whole composition in one viewport */
@media (max-height: 900px) and (min-width: 700px) {
  .lamp-stage {
    width: min(37vw, 430px);
  }

  .identity {
    margin-top: -32px;
  }

  h1 {
    font-size: clamp(72px, 9.2vw, 128px);
  }

  .descriptor {
    margin-top: 22px;
  }

  .serving-line {
    margin-top: 20px;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .theme-toggle {
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
  }

  .hero {
    padding-inline: 18px;
  }

  .lamp-stage {
    width: min(92vw, 430px);
    min-width: 0;
  }

  .lamp-switch {
    right: 1%;
    bottom: 2%;
    width: clamp(70px, 20vw, 92px);
  }

  .identity {
    margin-top: -20px;
  }

  h1 {
    font-size: clamp(61px, 20vw, 104px);
  }

  .descriptor {
    width: 94%;
    gap: 12px;
    font-size: clamp(10px, 3vw, 14px);
    letter-spacing: .28em;
  }

  .serving-line {
    width: 82%;
  }

  footer {
    letter-spacing: .18em;
  }
}

@media (max-width: 430px) {
  .theme-toggle__sun,
  .theme-toggle__moon {
    display: none;
  }

  .descriptor {
    grid-template-columns: 1fr auto 1fr;
  }

  .serving-line {
    width: 92%;
  }
}

/* Respect accessibility settings */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ==========================================================
   V2 REFINEMENTS — mobile fit, lighter typography, quote glow
   ========================================================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-synthesis: none;
}

.landing,
.hero {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Keep the complete hero inside one viewport on normal screens. */
.hero {
  min-height: 0;
  height: calc(100svh - 50px);
  justify-content: flex-start;
  padding-bottom: 8px;
}

.lamp-stage {
  width: min(42vw, 500px, 55svh);
  min-width: 0;
  max-width: calc(100vw - 32px);
}

.identity {
  margin-top: clamp(-34px, -2.8vw, -16px);
}

h1 {
  font-weight: 400;
  font-size: clamp(62px, 9.3vw, 142px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.descriptor {
  margin-top: clamp(16px, 2.2vh, 28px);
  font-weight: 400;
}

/* Physical lamp switch: slightly larger and farther right. */
.lamp-switch {
  right: -13%;
  bottom: 5%;
  width: clamp(88px, 21%, 128px);
}

/* Illuminated quote replacing the old dashed serving line. */
.serving-quote {
  position: relative;
  display: grid;
  place-items: center;
  width: min(92%, 760px);
  min-height: clamp(62px, 8vh, 92px);
  margin: clamp(14px, 2vh, 24px) auto 0;
  isolation: isolate;
}

.serving-quote::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: min(100%, 660px);
  height: 150%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--warm-rgb), .11) 0%,
    rgba(var(--warm-rgb), .045) 42%,
    transparent 72%
  );
  filter: blur(12px);
  opacity: .65;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.serving-quote p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 84%, var(--gold));
  font-family: var(--brand-font);
  font-size: clamp(20px, 2.15vw, 31px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .035em;
  text-align: center;
  text-wrap: balance;
  transition: opacity 180ms ease, transform 180ms ease, color var(--transition), text-shadow var(--transition);
}

.serving-quote p.is-changing {
  opacity: 0;
  transform: translateY(4px);
}

body.lamp-on .serving-quote::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.12);
}

body.lamp-on .serving-quote p {
  text-shadow:
    0 0 12px rgba(var(--warm-rgb), .22),
    0 0 32px rgba(var(--warm-rgb), .11);
}

html[data-theme="dark"] .serving-quote::before {
  opacity: .85;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--warm-rgb), .15) 0%,
    rgba(var(--warm-rgb), .055) 44%,
    transparent 74%
  );
}

html[data-theme="dark"] body.lamp-on .serving-quote p {
  text-shadow:
    0 0 12px rgba(var(--warm-rgb), .34),
    0 0 38px rgba(var(--warm-rgb), .18);
}

footer {
  padding-top: 6px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

footer .copyright {
  white-space: nowrap;
  margin-left: .7em;
}

/* Laptop/short screen */
@media (max-height: 820px) and (min-width: 681px) {
  .lamp-stage {
    width: min(34vw, 365px, 50svh);
  }

  .identity {
    margin-top: -28px;
  }

  h1 {
    font-size: clamp(66px, 8.2vw, 112px);
  }

  .descriptor {
    margin-top: 14px;
  }

  .serving-quote {
    margin-top: 8px;
    min-height: 52px;
  }

  .serving-quote p {
    font-size: clamp(18px, 1.7vw, 24px);
  }
}

/* Mobile: no horizontal or vertical page scrolling at common phone sizes. */
@media (max-width: 680px) {
  body {
    min-height: 100dvh;
  }

  .landing {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  .hero {
    height: calc(100dvh - 44px);
    min-height: 0;
    padding: 0 12px 4px;
  }

  .lamp-stage {
    width: min(86vw, 390px, 51dvh);
    max-width: calc(100vw - 24px);
  }

  .lamp-switch {
    right: -1px;
    bottom: 2%;
    width: clamp(82px, 23vw, 104px);
  }

  .identity {
    width: 100%;
    margin-top: clamp(-26px, -4vw, -14px);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(54px, 18.5vw, 92px);
    line-height: .88;
    letter-spacing: -.06em;
  }

  .descriptor {
    width: min(96%, 520px);
    margin-top: clamp(12px, 1.7dvh, 20px);
    gap: 10px;
    font-size: clamp(9px, 2.8vw, 13px);
    letter-spacing: .22em;
  }

  .serving-quote {
    width: 96%;
    min-height: clamp(48px, 7dvh, 68px);
    margin-top: clamp(8px, 1.3dvh, 15px);
  }

  .serving-quote p {
    max-width: 92vw;
    font-size: clamp(18px, 5.2vw, 25px);
    line-height: 1.15;
  }

  footer {
    padding: 4px 12px max(8px, env(safe-area-inset-bottom));
    font-size: clamp(7px, 2.1vw, 9px);
    line-height: 1.45;
    letter-spacing: .13em;
  }
}

/* Very small/short phones */
@media (max-width: 430px) and (max-height: 760px) {
  .lamp-stage {
    width: min(76vw, 315px, 44dvh);
  }

  h1 {
    font-size: clamp(48px, 16.8vw, 72px);
  }

  .descriptor {
    margin-top: 9px;
  }

  .serving-quote {
    margin-top: 5px;
    min-height: 43px;
  }

  .serving-quote p {
    font-size: clamp(16px, 4.8vw, 20px);
  }
}


/* ==========================================================
   V3 — iPhone fit, consistent Bodoni, softer theme transition
   ========================================================== */

:root {
  /* Webfont first: consistent on Windows, macOS and iOS. */
  --brand-font: "Bodoni Moda", "Bodoni Moda Local", Didot, "Bodoni MT", serif;
}

/* Soft veil used while changing day/night mode. */
body::after {
  content: "";
  position: fixed;
  z-index: 999;
  inset: 0;
  pointer-events: none;
  background: var(--theme-transition-color, transparent);
  opacity: 0;
  transition: opacity 420ms ease;
}

body.theme-transition::after {
  opacity: 1;
}

body,
.landing,
.hero,
h1,
.descriptor,
.serving-quote p,
footer,
.theme-toggle {
  transition:
    background-color 700ms ease,
    color 700ms ease,
    border-color 700ms ease,
    box-shadow 700ms ease,
    text-shadow 700ms ease;
}

.lamp {
  transition: opacity 180ms ease, filter 700ms ease;
}

body.theme-image-swap .lamp,
body.theme-image-swap .lamp-switch img {
  opacity: .18;
}

/* Quote deliberately uses exactly the same Bodoni family as the logo. */
.serving-quote p {
  font-family: var(--brand-font);
  font-size: clamp(23px, 2.35vw, 34px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .02em;
}

/* Give the physical switch a little more breathing room on desktop. */
@media (min-width: 681px) {
  .lamp-switch {
    right: -18%;
  }
}

/* iPhone / portrait phones: fit the complete composition safely. */
@media (max-width: 680px) {
  .hero {
    height: calc(100dvh - 48px);
    padding-inline: 10px;
  }

  .lamp-stage {
    width: min(80vw, 365px, 47dvh);
    max-width: calc(100vw - 20px);
  }

  .lamp-switch {
    right: 0;
    width: clamp(82px, 22vw, 100px);
  }

  .identity {
    margin-top: clamp(-20px, -3vw, -10px);
  }

  h1 {
    width: 100%;
    font-size: clamp(52px, 15.7vw, 82px);
    line-height: .9;
    letter-spacing: -.065em;
    white-space: nowrap;
  }

  .descriptor {
    width: 94%;
    margin-top: clamp(11px, 1.5dvh, 17px);
  }

  .serving-quote {
    min-height: clamp(54px, 7dvh, 70px);
    margin-top: clamp(7px, 1dvh, 12px);
  }

  .serving-quote p {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.1;
  }

  footer {
    font-size: clamp(7px, 1.9vw, 9px);
  }
}

/* Specifically protect tall Pro Max-class portrait viewports from overflow. */
@media (min-width: 390px) and (max-width: 460px) and (min-height: 800px) {
  .lamp-stage {
    width: min(78vw, 355px, 45dvh);
  }

  h1 {
    font-size: 15.2vw;
  }

  .serving-quote p {
    font-size: clamp(23px, 5.8vw, 27px);
  }
}


/* ==========================================================
   V4 — dedicated Lumelicious wordmark font + Libre Bodoni
   ========================================================== */

/*
  User-supplied logo font.
  Required server path:
  /assets/fonts/Lumelicious_logo_font.ttf
*/
@font-face {
  font-family: "Lumelicious Logo";
  src: url("../fonts/Lumelicious_logo_font.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Supporting editorial typography */
:root {
  --brand-font: "Lumelicious Logo", Didot, "Bodoni MT", serif;
  --editorial-font: "Libre Bodoni", Didot, "Bodoni MT", serif;
}

/* The nine-glyph font is used ONLY for the actual wordmark. */
h1 {
  font-family: var(--brand-font);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* All secondary serif copy uses Libre Bodoni. */
.descriptor,
.serving-quote p {
  font-family: var(--editorial-font);
}

.descriptor {
  font-weight: 500;
}

/* Make the quote more substantial without becoming heavy. */
.serving-quote p {
  font-size: clamp(24px, 2.45vw, 35px);
  font-weight: 500;
  font-style: italic;
  letter-spacing: .015em;
}

/* The custom wordmark has its own proportions, so don't compensate
   with the aggressive negative tracking used for generic Bodoni. */
@media (min-width: 681px) {
  h1 {
    font-size: clamp(70px, 9.5vw, 146px);
  }
}

@media (max-width: 680px) {
  h1 {
    width: auto;
    max-width: calc(100vw - 24px);
    margin-inline: auto;
    font-size: clamp(54px, 17.2vw, 88px);
    line-height: .92;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .serving-quote p {
    font-size: clamp(22px, 6.1vw, 29px);
    font-weight: 500;
  }
}


/* ==========================================================
   V5 — MOBILE LAYOUT REBUILD
   Desktop untouched. Mobile uses viewport-based composition.
   ========================================================== */

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
  }

  body {
    min-height: 100dvh;
  }

  .landing {
    display: block;
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .hero {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  /* Lamp is anchored to the top and sized by BOTH viewport dimensions. */
  .lamp-stage {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(78vw, 43dvh);
    min-width: 0;
    max-width: none;
    margin: 0;
    transform: translateX(-50%);
  }

  /* Keep switch attached to lamp instead of letting it influence layout. */
  .lamp-switch {
    right: -5%;
    bottom: 3%;
    width: clamp(76px, 19vw, 94px);
  }

  /* Identity gets its own fixed viewport zone.
     No element can make the page wider than the phone. */
  .identity {
    position: absolute;
    top: 48.5dvh;
    left: 50%;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0 14px;
    transform: translateX(-50%);
    overflow: visible;
  }

  h1 {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: "Lumelicious Logo", Didot, "Bodoni MT", serif;
    font-size: clamp(48px, 14.8vw, 72px);
    font-weight: 400;
    line-height: .92;
    letter-spacing: 0;
    white-space: nowrap;
    text-align: center;
    transform: none;
  }

  .descriptor {
    display: grid;
    grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr);
    width: calc(100% - 24px);
    max-width: 520px;
    margin: 2.3dvh auto 0;
    gap: 10px;
    font-size: clamp(9px, 2.55vw, 12px);
    line-height: 1;
    letter-spacing: .19em;
    white-space: nowrap;
  }

  .serving-quote {
    width: calc(100% - 28px);
    min-height: 0;
    margin: 2.3dvh auto 0;
  }

  .serving-quote::before {
    width: 90%;
    height: 180%;
  }

  .serving-quote p {
    max-width: 100%;
    margin: 0;
    font-family: "Libre Bodoni", Didot, "Bodoni MT", serif;
    font-size: clamp(20px, 5.5vw, 27px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: .01em;
    white-space: nowrap;
  }

  footer {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 100%;
    padding: 0 18px;
    font-size: clamp(7px, 1.8vw, 9px);
    line-height: 1.45;
    letter-spacing: .12em;
  }

  .theme-toggle {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    transform: scale(.9);
    transform-origin: top right;
  }
}

/* Shorter phones: move identity up and reduce lamp slightly. */
@media (max-width: 680px) and (max-height: 760px) {
  .lamp-stage {
    width: min(72vw, 40dvh);
  }

  .identity {
    top: 45dvh;
  }

  h1 {
    font-size: clamp(45px, 14vw, 66px);
  }

  .descriptor {
    margin-top: 1.8dvh;
  }

  .serving-quote {
    margin-top: 1.8dvh;
  }
}

/* iPhone Pro Max / tall phones */
@media (min-width: 390px) and (max-width: 460px) and (min-height: 800px) {
  .lamp-stage {
    width: min(78vw, 42.5dvh);
  }

  .identity {
    top: 47.5dvh;
  }

  h1 {
    font-size: 14.4vw;
  }
}


/* ==========================================================
   V6 — mobile wordmark fit + switch clearance
   ========================================================== */

@media (max-width: 680px) {
  /* Move only the identity block down; lamp/switch stay where they are. */
  .identity {
    top: 51.5dvh;
  }

  /* Custom wordmark must fit inside the viewport with safe side margins. */
  h1 {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    font-size: clamp(42px, 12.1vw, 60px);
    line-height: .92;
    margin-inline: auto;
    white-space: nowrap;
  }

  .descriptor {
    margin-top: 2.0dvh;
  }

  .serving-quote {
    margin-top: 2.0dvh;
  }
}

/* Pro Max / tall portrait phones */
@media (min-width: 390px) and (max-width: 460px) and (min-height: 800px) {
  .identity {
    top: 52dvh;
  }

  h1 {
    font-size: 12vw;
  }
}
