/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Core Stylesheet: Chocolatier Experience (Figma 1:2 & 1:41 Exact Composition) */

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

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip; /* Hallmark Gate 34: no horizontal scroll */
  background-color: var(--color-bg-page);
  color: var(--color-text-hero);
  font-family: var(--font-ui-sans);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   DESKTOP 1920x1080 BASELINE CANVAS (Exact Figma Node Coordinates)
   ========================================================================== */
.page-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 1920px;
  max-height: 1080px;
  margin: 0 auto;
  overflow: hidden;
  background-image: var(--page-overlay-glow);
  background-repeat: no-repeat;
  background-position: center top;
}

/* Theme Toggle Button (Figma node 1:3: x=84, y=19, size=74x74) */
.theme-toggle-btn {
  position: absolute;
  left: calc(84 / 1920 * 100%);
  top: calc(19 / 1080 * 100%);
  width: calc(74 / 1920 * 100%);
  height: calc(74 / 1080 * 100%);
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 30;
  color: var(--color-icon-brightness);
  transition: transform var(--transition-normal);
}

.theme-toggle-btn:hover {
  transform: rotate(25deg) scale(1.1);
}

.theme-toggle-btn:focus-visible {
  outline: 3px solid var(--color-brand-primary);
  outline-offset: 4px;
  border-radius: 50%;
}

.theme-toggle-btn:active {
  transform: scale(0.92);
}

.theme-toggle-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-toggle-icon path {
  stroke: var(--color-icon-brightness);
  transition: stroke var(--transition-normal);
}

/* Decorative Panel (Figma node 1:7: x=64, y=107, w=730, h=108, r=18) */
.decorative-panel {
  position: absolute;
  left: calc(64 / 1920 * 100%);
  top: calc(107 / 1080 * 100%);
  width: calc(730 / 1920 * 100%);
  height: calc(108 / 1080 * 100%);
  background-color: var(--panel-bg);
  border: 5px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: inset 0px 0px 0px 8px var(--panel-shadow-inset);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 20;
  transition: border-color var(--transition-normal);
}

.decorative-panel:focus-within {
  border-color: #5c353e;
}

.search-input-field {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--panel-text);
  font-family: var(--font-ui-sans);
  font-size: clamp(14px, 1.2vw, 20px);
  letter-spacing: 0.5px;
}

/* Tri-Color Stripes Card (Figma nodes 1:34, 1:35, 1:36: x=69, y=263, w=640, h=725) */
.left-badge-card {
  position: absolute;
  left: calc(69 / 1920 * 100%);
  top: calc(263 / 1080 * 100%);
  width: calc(640 / 1920 * 100%);
  height: calc(725 / 1080 * 100%);
  border-radius: 0; /* Sharp rectangular in Figma */
  box-shadow: none; /* Flat backdrop in Figma */
  overflow: visible;
  z-index: 10;
}

.stripes-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 209fr 220fr 211fr;
  width: 100%;
  height: 100%;
}

.stripe-dark {
  background-color: var(--stripe-left);
  height: 100%;
}

.stripe-crimson {
  background-color: var(--stripe-mid);
  height: 100%;
}

.stripe-light {
  background-color: var(--stripe-right);
  height: 100%;
}

/* Chef Badge Overlay (Figma node 1:39: x=102, y=331, w=599, h=559 relative to canvas) */
/* Relative to left-badge-card (69, 263, 640x725): left = (102-69)=33, top = (331-263)=68 */
.chef-badge-image {
  position: absolute;
  left: calc(33 / 640 * 100%);
  top: calc(68 / 725 * 100%);
  width: calc(599 / 640 * 100%);
  height: calc(559 / 725 * 100%);
  object-fit: contain;
  z-index: 15;
  transition: transform var(--transition-normal);
}

.left-badge-card:hover .chef-badge-image {
  transform: scale(1.02) translateY(-3px);
}

/* Center Character Stage (Figma node 1:38: x=738, y=161, w=640, h=899) */
.character-sprite-container {
  position: absolute;
  left: calc(738 / 1920 * 100%);
  top: calc(161 / 1080 * 100%);
  width: calc(640 / 1920 * 100%);
  height: calc(899 / 1080 * 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  animation: characterFloat 6s ease-in-out infinite;
}

.character-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  pointer-events: none;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.45));
}

@keyframes characterFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Chocolatier Lockup (Figma node 1:9: x=1102, y=30, w=608, h=154) */
.chocolatier-lockup {
  position: absolute;
  left: calc(1102 / 1920 * 100%);
  top: calc(30 / 1080 * 100%);
  width: calc(608 / 1920 * 100%);
  height: calc(154 / 1080 * 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 25;
}

.chocolatier-wordmark {
  display: flex;
  align-items: baseline;
  line-height: 0.82;
  position: relative;
}

.letter-c-container {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: calc(83.12 / 608 * 100%);
}

.letter-c {
  font-family: var(--font-display-serif);
  font-weight: 500;
  font-size: clamp(54px, 6.25vw, 120px);
  color: var(--color-brand-primary);
  line-height: 0.85;
}

.letter-c-lines {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 130%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.letter-c-divider {
  height: 2px;
  background-color: var(--color-brand-primary);
  width: 100%;
}

.word-hocolatier {
  font-family: var(--font-display-script);
  font-weight: 400;
  font-size: clamp(58px, 6.66vw, 128px);
  color: var(--color-brand-primary);
  letter-spacing: 2px;
  line-height: 0.85;
  margin-left: 4px;
}

.chocolatier-accent-bar {
  width: calc(614 / 608 * 100%);
  height: 11px;
  background-color: var(--color-brand-accent);
  border-radius: 2px;
  margin-top: 10px;
}

/* Chef Hat Logo (Figma node 1:15: x=1716, y=14, w=188, h=180) */
.header-chef-hat {
  position: absolute;
  left: calc(1716 / 1920 * 100%);
  top: calc(14 / 1080 * 100%);
  width: calc(188 / 1920 * 100%);
  height: calc(180 / 1080 * 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.chef-hat-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Category Label: "dress" (Figma node 1:27: x=1497, y=194, w=232, h=91) */
.category-dress-label {
  position: absolute;
  left: calc(1497 / 1920 * 100%);
  top: calc(194 / 1080 * 100%);
  width: calc(232 / 1920 * 100%);
  height: calc(91 / 1080 * 100%);
  font-family: var(--font-accent-serif);
  font-size: clamp(42px, 4.74vw, 91px);
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--color-text-hero);
  line-height: 0.9;
  user-select: none;
  z-index: 25;
  transition: color var(--transition-smooth);
}

/* Continue Button (Figma node 1:28: x=1515, y=696, w=213, h=225, r=31, b=12) */
.continue-action-btn {
  position: absolute;
  left: calc(1515 / 1920 * 100%);
  top: calc(696 / 1080 * 100%);
  width: calc(213 / 1920 * 100%);
  height: calc(225 / 1080 * 100%);
  background: transparent;
  border: 12px solid var(--btn-border);
  border-radius: 31px;
  box-shadow: inset 0px 0px 0px 14px var(--btn-shadow-inset);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.continue-action-btn:hover {
  transform: scale(1.05) translateX(3px);
  border-color: var(--btn-hover-border);
  box-shadow: inset 0px 0px 0px 14px var(--btn-shadow-inset), 0 10px 25px var(--btn-hover-glow);
}

.continue-action-btn:focus-visible {
  outline: 4px solid var(--color-brand-primary);
  outline-offset: 6px;
}

.continue-action-btn:active {
  transform: scale(0.96) translateX(2px);
  box-shadow: inset 0px 0px 0px 14px #66353e;
}

.arrow-icon-svg {
  width: calc(125 / 213 * 100%);
  height: calc(96 / 225 * 100%);
  display: block;
  transition: transform var(--transition-fast);
}

.continue-action-btn:hover .arrow-icon-svg {
  transform: translateX(4px);
}

/* Footer Section (Figma node 1:32: x=34, y=988; text at x=59, dashed line at x=262, y=1038) */
.page-footer {
  position: absolute;
  left: 0;
  top: calc(988 / 1080 * 100%);
  width: 100%;
  height: calc(83 / 1080 * 100%);
  z-index: 20;
}

.footer-copyright {
  position: absolute;
  left: calc(59 / 1920 * 100%);
  top: calc(50 / 83 * 100%);
  transform: translateY(-50%);
  font-family: var(--font-display-serif);
  font-size: clamp(20px, 2.08vw, 40px);
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  line-height: 1;
  display: flex;
  align-items: center;
}

.footer-dashed-line-container {
  position: absolute;
  left: calc(262 / 1920 * 100%);
  top: calc(50 / 83 * 100%);
  transform: translateY(-50%);
  width: calc(714 / 1920 * 100%);
  height: 3px;
  display: flex;
  align-items: center;
}

.footer-dashed-line {
  width: 100%;
  height: 3px;
  background-image: repeating-linear-gradient(
    to right,
    var(--footer-border-color),
    var(--footer-border-color) 12px,
    transparent 12px,
    transparent 22px
  );
  opacity: 0.85;
}

/* ==========================================================================
   RESPONSIVE LAYOUTS (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .page-stage {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: clip;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .theme-toggle-btn {
    position: static;
    order: 3;
    width: 60px;
    height: 60px;
  }

  .decorative-panel {
    position: static;
    order: 4;
    width: 100%;
    max-width: 480px;
    height: 64px;
  }

  .chocolatier-lockup {
    position: static;
    order: 1;
    width: auto;
    height: auto;
    align-items: center;
  }

  .header-chef-hat {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
  }

  .category-dress-label {
    position: static;
    order: 2;
    width: auto;
    height: auto;
    text-align: center;
    font-size: 48px;
  }

  .character-sprite-container {
    position: static;
    order: 5;
    width: 100%;
    max-width: 420px;
    height: 420px;
  }

  .left-badge-card {
    position: static;
    order: 6;
    width: 100%;
    max-width: 420px;
    height: 475px; /* Proportional 640x725 */
  }

  .continue-action-btn {
    position: static;
    order: 7;
    width: 140px;
    height: 130px;
  }

  .page-footer {
    position: static;
    order: 8;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
  }

  .footer-copyright {
    position: static;
    transform: none;
    font-size: 24px;
  }

  .footer-dashed-line-container {
    position: static;
    transform: none;
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .page-stage {
    padding: 14px;
  }

  .letter-c {
    font-size: 48px;
  }

  .word-hocolatier {
    font-size: 52px;
  }

  .category-dress-label {
    font-size: 36px;
  }

  .decorative-panel {
    height: 52px;
  }

  .character-sprite-container {
    max-width: 320px;
    height: 320px;
  }

  .left-badge-card {
    max-width: 320px;
    height: 362px;
  }

  .continue-action-btn {
    width: 120px;
    height: 110px;
    border-width: 8px;
  }

  .footer-copyright {
    font-size: 18px;
  }
}
