/* Hero: intro text on the left, website + phone mockups on the right */
.hero { min-height: calc(100vh - 76px); display: grid; align-items: center; padding-block: var(--space-12) var(--space-16); }
.hero-inner { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: var(--space-12); align-items: center; }
/* Capped so the longest rotating word fits on one line next to the mockups */
.hero h1 { margin-top: var(--space-4); font-size: clamp(2.875rem, 1.6rem + 4vw, 5rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* Mockup stage */
.hero-stage { position: relative; height: 540px; perspective: 1600px; }
.mock-browser {
  position: absolute; top: 30px; left: 0; width: 88%; height: 380px;
  border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--color-line-strong);
  box-shadow: 0 50px 100px #000a;
  background: var(--mock-bg);
  transform: rotateY(-12deg) rotateX(5deg);
}
.mock-bar { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #1b1b26; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff38; }
.mock-bar span { margin-left: var(--space-3); padding: 2px 12px; border-radius: 6px; background: #ffffff10; color: #ffffff80; font-size: 0.75rem; }

.mock-phone {
  position: absolute; right: 0; top: 120px; width: 210px; height: 420px; z-index: 2;
  border-radius: 34px; border: 6px solid #1b1b26; overflow: hidden;
  background: var(--mock-bg);
  box-shadow: 0 40px 80px #000b;
  transform: rotateY(-16deg) rotateX(4deg);
}

/* Mock website content, styled by --mock-* variables (one set per industry theme) */
.mock-site { position: relative; height: calc(100% - 32px); padding: 22px 26px; color: var(--mock-text); font-family: var(--mock-font-body); }
.mock-phone .mock-site { height: 100%; padding: 24px 16px; }
.mock-nav { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; opacity: 0.85; }
.mock-nav b { font: 700 0.9375rem var(--mock-font-head); }
.mock-site h2 {
  margin: 30px 0 12px; max-width: 11em;
  font: var(--mock-weight) var(--mock-size) / 1.05 var(--mock-font-head);
  letter-spacing: var(--mock-tracking); text-transform: var(--mock-case);
  color: var(--mock-text);
}
.mock-phone .mock-site h2 { margin-top: 22px; font-size: calc(var(--mock-size) * 0.7); }
.mock-site p { max-width: 22em; font-size: 0.8125rem; line-height: 1.5; opacity: 0.75; }
.mock-cta { display: inline-block; margin-top: 16px; padding: 9px 16px; border-radius: var(--mock-radius); background: var(--mock-accent); color: var(--mock-on-accent); font-size: 0.75rem; font-weight: 600; }
.mock-media { position: absolute; right: 150px; bottom: 24px; width: 30%; aspect-ratio: 4 / 3; border-radius: var(--mock-radius-media); background: var(--mock-media); display: grid; place-items: center; overflow: hidden; }
.mock-media svg { width: 56%; height: auto; }
.mock-phone .mock-media { position: static; width: 100%; margin-top: 18px; }

/* Industry themes. Colors are registered so they can transition smoothly. */
@property --mock-bg { syntax: "<color>"; inherits: true; initial-value: #f3ead8; }
@property --mock-text { syntax: "<color>"; inherits: true; initial-value: #3b2a1a; }
@property --mock-accent { syntax: "<color>"; inherits: true; initial-value: #3b2a1a; }
@property --mock-on-accent { syntax: "<color>"; inherits: true; initial-value: #f3ead8; }

.hero-stage {
  /* Café (default) */
  --mock-bg: #f3ead8; --mock-text: #3b2a1a; --mock-accent: #3b2a1a; --mock-on-accent: #f3ead8;
  --mock-font-head: "Fraunces", Georgia, serif; --mock-font-body: var(--font-body);
  --mock-weight: 700; --mock-size: 2.3rem; --mock-tracking: -0.01em; --mock-case: none;
  --mock-radius: 999px; --mock-radius-media: 18px;
  --mock-media: linear-gradient(135deg, #d39a63, #7a4a26);
  transition: --mock-bg 0.6s var(--ease-out), --mock-text 0.6s var(--ease-out), --mock-accent 0.6s var(--ease-out), --mock-on-accent 0.6s var(--ease-out);
}
.hero:has(input[value="craft"]:checked) .hero-stage {
  --mock-bg: #17201a; --mock-text: #e9efe4; --mock-accent: #c9a46a; --mock-on-accent: #17201a;
  --mock-font-head: "Archivo", system-ui, sans-serif;
  --mock-weight: 800; --mock-size: 2.2rem; --mock-tracking: 0; --mock-case: uppercase;
  --mock-radius: 3px; --mock-radius-media: 4px;
  --mock-media: repeating-linear-gradient(100deg, #a87b50 0 14px, #b98b5e 14px 30px, #93683f 30px 38px);
}
.hero:has(input[value="booking"]:checked) .hero-stage {
  --mock-bg: #ffffff; --mock-text: #0f172a; --mock-accent: #2563eb; --mock-on-accent: #ffffff;
  --mock-font-head: var(--font-body);
  --mock-weight: 600; --mock-size: 2.1rem; --mock-tracking: -0.02em; --mock-case: none;
  --mock-radius: 10px; --mock-radius-media: 14px;
  --mock-media: linear-gradient(135deg, #dbeafe, #93c5fd);
}

/* Show only the content of the selected theme; it fades in when it appears */
[data-theme] { display: none; }
.hero:has(input[value="cafe"]:checked) [data-theme~="cafe"],
.hero:has(input[value="craft"]:checked) [data-theme~="craft"],
.hero:has(input[value="booking"]:checked) [data-theme~="booking"] { display: block; animation: mock-in 0.5s var(--ease-out); }
@keyframes mock-in { from { opacity: 0; transform: translateY(8px); } }

.hero:has(input[value="booking"]:checked) .mock-phone .mock-media { display: none; }

/* Booking theme: time slots in the phone */
.mock-slots { display: grid; gap: 6px; margin-top: 14px; }
.mock-slots span { display: flex; justify-content: space-between; padding: 7px 10px; border: 1px solid #0f172a22; border-radius: 8px; font-size: 0.6875rem; }
.mock-slots .is-selected { background: var(--mock-accent); border-color: var(--mock-accent); color: var(--mock-on-accent); }

/* Background glow follows the selected theme */
.backdrop .glow-1 { transition: background 1s var(--ease-out); }
body:has(.hero input[value="craft"]:checked) .backdrop .glow-1 { background: #4d7c0f; }
body:has(.hero input[value="booking"]:checked) .backdrop .glow-1 { background: #1d4ed8; }

/* Theme switcher: native radio buttons styled as chips (keyboard: arrow keys) */
.theme-switch { margin-top: var(--space-12); max-width: 520px; padding: var(--space-4); border: 1px solid var(--color-line-strong); border-radius: 20px; background: #ffffff08; backdrop-filter: blur(8px); }
.theme-switch legend { float: left; width: 100%; margin-bottom: var(--space-3); padding: 0 var(--space-1); font-size: 0.8125rem; color: var(--color-muted); }
.theme-switch legend b { color: var(--color-text); font-weight: 600; }
.theme-chips { clear: both; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.theme-chip { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.6rem 1rem; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); }
.theme-chip:hover { background: #ffffff10; }
.theme-chip input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chip i { width: 10px; height: 10px; border-radius: 50%; }
.theme-chip:has(input:checked) { background: #fff; border-color: #fff; color: #000; }
.theme-chip:has(input:focus-visible) { outline: 2px solid var(--color-cyan); outline-offset: 3px; }

/* Floating labels */
.hero-tag { position: absolute; z-index: 3; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--color-line-strong); background: #11111ae0; backdrop-filter: blur(10px); font-size: 0.8125rem; line-height: 1.35; color: var(--color-muted); }
.hero-tag b { display: block; color: var(--color-text); font-size: 0.875rem; }
.hero-tag-concept { left: 40px; bottom: 30px; }
.hero-tag-devices { right: 170px; top: 0; }

/* Rotating word in the headline (pure CSS); all words share one grid cell so nothing jumps */
.rotator { display: inline-grid; vertical-align: top; }
.rotator-word { grid-area: 1 / 1; opacity: 0; animation: rotate-word 10s var(--ease-out) infinite both; }
.rotator-word:nth-child(1) { opacity: 1; }
.rotator-word:nth-child(2) { animation-delay: 2.5s; }
.rotator-word:nth-child(3) { animation-delay: 5s; }
.rotator-word:nth-child(4) { animation-delay: 7.5s; }
@keyframes rotate-word {
  0% { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
  5%, 21% { opacity: 1; transform: none; filter: blur(0); }
  25%, 100% { opacity: 0; transform: translateY(-0.35em); filter: blur(6px); }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Entrance on page load */
.hero-text > *, .hero-stage { animation: hero-rise 0.9s var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 0.08s; }
.hero-text > :nth-child(3) { animation-delay: 0.16s; }
.hero-text > :nth-child(4) { animation-delay: 0.24s; }
.hero-text > :nth-child(5) { animation-delay: 0.32s; }
.hero-stage { animation-delay: 0.2s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(24px); } }

/* Pointer effects (values are set by js/main.js for mouse users only) */
.hero { position: relative; }
.hero-inner { position: relative; z-index: 1; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(520px circle at var(--pointer-x, 50%) var(--pointer-y, 30%), #8b5cf62e, transparent 65%);
  transition: opacity 0.4s;
}
.hero.has-pointer .hero-glow { opacity: 1; }
.mock-browser { transform: rotateY(calc(-12deg + var(--tilt-x, 0) * 10deg)) rotateX(calc(5deg - var(--tilt-y, 0) * 8deg)); transition: transform 0.4s var(--ease-out); }
.mock-phone { transform: rotateY(calc(-16deg + var(--tilt-x, 0) * 14deg)) rotateX(calc(4deg - var(--tilt-y, 0) * 10deg)) translateZ(40px); transition: transform 0.4s var(--ease-out); }

@media (max-width: 960px) {
  .hero { min-height: auto; padding-top: var(--space-8); }
  /* Mobile order: text, buttons, mockups, then the switcher right below them */
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-text { display: contents; }
  .hero-stage { order: 1; margin-top: var(--space-12); }
  .theme-switch { order: 2; margin-top: var(--space-6); }
  .hero-stage { height: 470px; perspective: none; }
  .mock-browser { width: 100%; height: 330px; top: 0; transform: none; }
  .mock-site { padding: 18px 20px; }
  .mock-browser .mock-site h2 { max-width: 58%; font-size: calc(var(--mock-size) * 0.75); }
  .mock-browser .mock-site p { max-width: 58%; }
  .mock-browser .mock-media { display: none; }
  .mock-phone { width: 150px; height: 300px; top: 200px; right: -4px; transform: none; border-width: 5px; border-radius: 26px; }
  .mock-phone .mock-site { padding: 18px 12px; }
  .mock-phone .mock-site h2 { font-size: 1.05rem; }
  .hero-tag-devices { display: none; }
  .hero-tag-concept { left: 0; bottom: 0; }
}
