/* ==========================================================================
   仕出し料理 花膳 - 高級和モダン・宅配懐石デザインシステム
   ========================================================================== */

/* Google Fonts & Custom Properties */
:root {
  /* Colors */
  --washiki-beige: #fafaf6;    /* 和紙・漆喰の生成り色 (Base BG) */
  --sumi-black: #1c1917;       /* 墨黒 (Text) */
  --shuri-red: #7f1d1d;        /* 朱塗り・深緋赤 (Primary / Theme) */
  --shuri-red-dark: #450a0a;   /* 漆赤ダーク (Hover / Accent) */
  --shuri-red-light: #fef2f2;  /* 淡い朱赤 */
  --kamon-gold: #d97706;       /* 金・黄土 (Accent / Warning) */
  --kamon-gold-light: #fef3c7; /* 淡い金色 */
  --matsuba-green: #14532d;    /* 松葉グリーン (Success / Leaf / Valid) */
  --matsuba-green-light: #f0fdf4;
  
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-600: #57534e;
  
  /* Theme variations for uses */
  --celebration-gold: #ca8a04;
  --funeral-purple: #581c87;
  --funeral-purple-light: #faf5ff;
  
  /* Fonts */
  --font-serif: 'Noto Serif JP', serif;
  --font-round: 'Kiwi Maru', serif;
  --font-eng: 'Cinzel', serif;
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.25s ease;
  
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 12px 24px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 20px 40px rgba(28, 25, 23, 0.1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--washiki-beige);
  color: var(--sumi-black);
  font-family: var(--font-serif);
  line-height: 1.85;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, .logo-main, .section-subtitle {
  font-family: var(--font-round);
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.bg-stone {
  background-color: var(--stone-100);
}

/* Common Layout Elements */
.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  display: block;
  font-size: 1rem;
  color: var(--shuri-red);
  letter-spacing: 0.25em;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.section-title {
  font-size: 2.25rem;
  color: var(--sumi-black);
  position: relative;
  display: inline-block;
  padding-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--shuri-red);
}

.section-title.text-left {
  text-align: left;
  display: block;
  padding-bottom: 1rem;
}

.section-title.text-left::after {
  left: 0;
  transform: none;
}

.section-lead-text {
  font-size: 1.05rem;
  color: var(--stone-600);
  max-width: 750px;
  margin: 1.5rem auto 0;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.25rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--shuri-red);
  color: var(--washiki-beige);
}

.btn-primary:hover {
  background-color: var(--shuri-red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--shuri-red);
  border-color: var(--shuri-red);
}

.btn-secondary:hover {
  background-color: var(--shuri-red-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-large {
  padding: 1.25rem 3.5rem;
  font-size: 1.15rem;
  width: 100%;
  max-width: 420px;
}

/* ==========================================================================
   Header & Mobile Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 250, 246, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone-200);
  z-index: 1000;
  transition: var(--transition-fast);
}

.header-container {
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--stone-600);
  font-weight: 300;
}

.logo-main {
  font-size: 1.45rem;
  color: var(--shuri-red);
  letter-spacing: 0.05em;
}

.nav-desktop ul {
  display: flex;
  gap: 2.25rem;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sumi-black);
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.5rem 0;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--shuri-red);
  transition: var(--transition-fast);
}

.nav-desktop a:hover {
  color: var(--shuri-red);
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--sumi-black);
  transition: var(--transition-fast);
  transform-origin: left center;
}

.site-header:has(.nav-toggle-btn[aria-expanded="true"]) .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
}

.site-header:has(.nav-toggle-btn[aria-expanded="true"]) .hamburger-line:nth-child(2) {
  opacity: 0;
}

.site-header:has(.nav-toggle-btn[aria-expanded="true"]) .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--washiki-beige);
  padding: 7rem 2rem 2rem;
  z-index: 990;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
}

.nav-mobile[aria-hidden="false"] {
  transform: translateY(0);
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.nav-mobile a {
  font-family: var(--font-round);
  font-size: 1.5rem;
  color: var(--sumi-black);
  letter-spacing: 0.1em;
}

.nav-mobile a:hover {
  color: var(--shuri-red);
}

/* ==========================================================================
   Hero Section & Kaiseki Bento SVG
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 7rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image: 
    radial-gradient(var(--stone-200) 1.2px, transparent 1.2px),
    radial-gradient(var(--stone-200) 1.2px, transparent 1.2px);
  background-size: 48px 48px;
  background-position: 0 0, 24px 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
}

.hero-tagline {
  font-family: var(--font-round);
  font-size: 1.35rem;
  color: var(--shuri-red);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.35;
  color: var(--sumi-black);
  margin-bottom: 2rem;
  letter-spacing: 0.06em;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--stone-600);
  margin-bottom: 3.5rem;
  max-width: 560px;
  font-weight: 300;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
}

/* Kaiseki SVG Interactive Animation */
.kaiseki-svg-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.kaiseki-box-svg {
  filter: drop-shadow(0 25px 45px rgba(0,0,0,0.18));
}

/* Steaming Animations (湯気) */
@keyframes waveUp {
  0% {
    stroke-dashoffset: 0;
    transform: translateY(12px) scaleX(0.9);
    opacity: 0;
  }
  15% {
    opacity: 0.45;
  }
  50% {
    transform: translateY(-15px) scaleX(1.15);
    opacity: 0.7;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    stroke-dashoffset: -100;
    transform: translateY(-35px) scaleX(0.9);
    opacity: 0;
  }
}

.steam-wave {
  stroke-dasharray: 30, 70;
  transform-origin: bottom center;
}

.steam-1 {
  animation: waveUp 5.5s infinite linear;
}

.steam-2 {
  animation: waveUp 6.5s infinite linear;
  animation-delay: 2.2s;
}

/* ==========================================================================
   About Section & Philosophy Accordion (hidden="until-found")
   ========================================================================== */
.about-section {
  padding: 8rem 0;
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
}

.accordion-container {
  max-width: 950px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.accordion-item {
  background-color: var(--washiki-beige);
  border: 1px solid var(--stone-200);
  border-radius: 2px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-item:has(.accordion-trigger[aria-expanded="true"]) {
  border-color: var(--shuri-red);
  box-shadow: var(--shadow-md);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 1.5rem 2.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--sumi-black);
  transition: var(--transition-fast);
}

.accordion-trigger:hover {
  background-color: var(--stone-100);
}

.trigger-number {
  font-family: var(--font-round);
  font-size: 1.35rem;
  color: var(--shuri-red);
  margin-right: 1.5rem;
  font-weight: bold;
}

.trigger-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
  letter-spacing: 0.05em;
}

/* Icon (Plus / Minus) */
.accordion-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background-color: var(--shuri-red);
  transition: var(--transition-smooth);
}

.accordion-icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}

.accordion-icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 16px;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* Panel styling - standard behavior and until-found fallback */
.accordion-panel {
  transition: var(--transition-smooth);
}

.accordion-panel:not([hidden]) {
  border-top: 1px solid var(--stone-200);
}

.panel-inner-content {
  padding: 3rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.panel-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--stone-600);
}

.panel-text p:last-child {
  margin-bottom: 0;
}

.panel-highlight {
  font-family: var(--font-round);
  color: var(--shuri-red) !important;
  font-weight: 600;
}

.panel-svg-art {
  display: block;
  margin: 0 auto;
}

/* ==========================================================================
   Menu Section & Tabs
   ========================================================================== */
.menu-section {
  padding: 8rem 0;
}

.tabs-container {
  max-width: 1050px;
  margin: 0 auto;
}

/* Tab List */
.tab-list {
  display: flex;
  justify-content: center;
  border-bottom: 2px solid var(--stone-200);
  margin-bottom: 4rem;
  gap: 1.5rem;
}

.tab-button {
  padding: 1rem 3rem;
  font-family: var(--font-round);
  font-size: 1.25rem;
  background: transparent;
  border: none;
  color: var(--stone-600);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--shuri-red);
  transition: var(--transition-smooth);
}

.tab-button.active {
  color: var(--shuri-red);
}

.tab-button.active::after {
  width: 100%;
}

/* Tab Panels */
.tab-panel {
  transition: var(--transition-smooth);
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel:not([hidden]) {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

/* Menu Grid & Cards */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 2.5rem;
}

.menu-card {
  background-color: var(--washiki-beige);
  border: 1px solid var(--stone-200);
  border-radius: 2px;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
}

.menu-card:hover {
  transform: translateY(-5px);
  border-color: var(--shuri-red);
  box-shadow: var(--shadow-md);
}

.menu-card-inner {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.menu-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--kamon-gold);
  color: var(--washiki-beige);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-weight: bold;
}

.menu-card-badge.business-badge {
  background-color: var(--stone-600);
}

.menu-card-badge.celebration-badge {
  background-color: var(--shuri-red);
}

.menu-card-badge.funeral-badge {
  background-color: var(--funeral-purple);
}

.menu-svg-thumb {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-item-name {
  font-size: 1.3rem;
  color: var(--sumi-black);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.menu-item-desc {
  font-size: 0.95rem;
  color: var(--stone-600);
  margin-bottom: 2rem;
  line-height: 1.65;
  flex: 1;
  font-weight: 300;
}

.menu-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--stone-100);
  padding-top: 1.25rem;
}

.menu-item-price {
  font-family: var(--font-round);
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--shuri-red);
}

.tax-in {
  font-size: 0.75rem;
  color: var(--stone-600);
  font-weight: normal;
}

.btn-order-select {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  background-color: var(--stone-100);
  color: var(--shuri-red);
  border: 1px solid var(--stone-300);
  border-radius: 2px;
}

.btn-order-select:hover {
  background-color: var(--shuri-red);
  color: var(--washiki-beige);
  border-color: var(--shuri-red);
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   Chef (Speech Bubble) Section
   ========================================================================== */
.chef-section {
  padding: 7rem 0;
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
}

.chef-container-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 5rem;
  align-items: center;
  max-width: 950px;
}

.chef-illustration {
  max-width: 270px;
  margin: 0 auto;
}

.chef-svg {
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.08));
}

.chef-speech-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Speech Bubble styling */
.speech-bubble {
  position: relative;
  background-color: var(--washiki-beige);
  border: 2px solid var(--shuri-red);
  border-radius: 6px;
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent var(--shuri-red) transparent transparent;
  display: block;
  width: 0;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent var(--washiki-beige) transparent transparent;
  display: block;
  width: 0;
}

.chef-name {
  font-family: var(--font-round);
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--shuri-red);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--stone-200);
  padding-bottom: 0.25rem;
}

.bubble-text-wrapper {
  min-height: 80px;
  display: flex;
  align-items: center;
}

.bubble-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--sumi-black);
}

/* Use theme bubble variations */
.speech-bubble.celebration-theme {
  border-color: var(--celebration-gold);
  background-color: var(--kamon-gold-light);
}
.speech-bubble.celebration-theme::before {
  border-color: transparent var(--celebration-gold) transparent transparent;
}
.speech-bubble.celebration-theme::after {
  border-color: transparent var(--kamon-gold-light) transparent transparent;
}
.speech-bubble.celebration-theme .chef-name {
  color: var(--celebration-gold);
}

.speech-bubble.funeral-theme {
  border-color: var(--funeral-purple);
  background-color: var(--funeral-purple-light);
}
.speech-bubble.funeral-theme::before {
  border-color: transparent var(--funeral-purple) transparent transparent;
}
.speech-bubble.funeral-theme::after {
  border-color: transparent var(--funeral-purple-light) transparent transparent;
}
.speech-bubble.funeral-theme .chef-name {
  color: var(--funeral-purple);
}

.speech-bubble.bubble-alert {
  border-color: var(--umeboshi-red);
  background-color: var(--umeboshi-red-light);
}
.speech-bubble.bubble-alert::before {
  border-color: transparent var(--umeboshi-red) transparent transparent;
}
.speech-bubble.bubble-alert::after {
  border-color: transparent var(--umeboshi-red-light) transparent transparent;
}
.speech-bubble.bubble-alert .chef-name {
  color: var(--umeboshi-red);
}

/* Live Calc Output Display */
.live-calc-summary {
  background-color: var(--stone-100);
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 500;
  color: var(--stone-600);
}

.calc-val {
  font-family: var(--font-round);
  font-weight: bold;
  color: var(--sumi-black);
}

.text-alert {
  color: var(--umeboshi-red);
}

/* ==========================================================================
   Booking Form with CSS :has() & :user-invalid
   ========================================================================== */
.order-section {
  padding: 8rem 0;
}

.order-form {
  background-color: var(--washiki-beige);
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  padding: 4.5rem 3.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 850px;
  margin: 0 auto;
}

.form-fieldset {
  border: 1px solid var(--stone-300);
  border-radius: 4px;
  padding: 2.25rem;
  margin-bottom: 3rem;
  background-color: var(--washiki-beige);
}

.fieldset-legend {
  font-family: var(--font-round);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0 1.25rem;
  color: var(--shuri-red);
}

/* Horizontal Radio Button Choice Setup */
.radio-group-horizontal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--stone-200);
  border-radius: 2px;
  cursor: pointer;
  background-color: var(--washiki-beige);
  transition: var(--transition-fast);
}

.radio-label:hover {
  background-color: var(--stone-100);
  border-color: var(--shuri-red);
}

/* Hide native input */
.radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-radio {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--stone-300);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-top: 4px;
  transition: var(--transition-fast);
}

.custom-radio::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--shuri-red);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: var(--transition-fast) cubic-bezier(0.25, 1, 0.5, 1);
}

/* Radio Checked States */
.radio-label:has(input[type="radio"]:checked) {
  border-color: var(--shuri-red);
  background-color: var(--shuri-red-light);
}

.radio-label:has(input[type="radio"]:checked) .custom-radio {
  border-color: var(--shuri-red);
}

.radio-label:has(input[type="radio"]:checked) .custom-radio::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-text {
  display: flex;
  flex-direction: column;
}

.radio-text strong {
  font-size: 1.05rem;
  color: var(--sumi-black);
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--stone-600);
  margin-top: 0.25rem;
}

/* Dynamic displays via CSS :has() selector */
/* Hide delivery details unless receipt-delivery radio checked */
.order-form:not(:has(#receipt-delivery:checked)) #delivery-details-fieldset {
  display: none;
}

/* Hide pickup details unless receipt-pickup radio checked */
.order-form:not(:has(#receipt-pickup:checked)) #pickup-details-fieldset {
  display: none;
}

/* General Inputs */
.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  position: relative;
}

.field-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--sumi-black);
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.95rem 1.25rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  border: 1px solid var(--stone-300);
  border-radius: 2px;
  background-color: var(--washiki-beige);
  color: var(--sumi-black);
  transition: var(--transition-fast);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--shuri-red);
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08);
  background-color: #fff;
}

/* Dynamic input details */
.qty-desc-hint {
  font-size: 0.8rem;
  color: var(--stone-600);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Validation styling with :user-invalid (No premature errors) */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--umeboshi-red);
  background-color: var(--umeboshi-red-light);
}

input:user-invalid:focus,
select:user-invalid:focus,
textarea:user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.error-message {
  display: none;
  font-size: 0.85rem;
  color: var(--umeboshi-red);
  margin-top: 0.4rem;
  font-weight: 600;
}

.field-group:has(:user-invalid) .error-message {
  display: block;
  animation: fadeIn 0.2s ease forwards;
}

input:user-valid,
select:user-valid,
textarea:user-valid {
  border-color: var(--matsuba-green);
}

/* Double-check styling parent with :has() */
.field-group:has(:user-invalid) .field-label {
  color: var(--umeboshi-red);
}

/* Allergy text detection banner display */
.allergy-caution-banner {
  display: none;
  background-color: var(--umeboshi-red-light);
  border: 1px solid var(--umeboshi-red);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--umeboshi-red);
  margin-top: 1rem;
  line-height: 1.6;
}

.allergy-caution-banner.show-banner {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

/* Submit Section & Overall Error Summary */
.form-submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  border-top: 1px solid var(--stone-200);
  padding-top: 2.5rem;
}

.form-error-summary {
  display: none;
  background-color: var(--umeboshi-red-light);
  border: 2px solid var(--umeboshi-red);
  border-radius: 2px;
  padding: 1.25rem 2.25rem;
  color: var(--umeboshi-red);
  margin-bottom: 2rem;
  width: 100%;
  font-weight: bold;
  text-align: center;
}

/* When class .form-submitted added and form invalid, show summary */
.order-form.form-submitted:has(:invalid) .form-error-summary {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

/* ==========================================================================
   Access Map Section
   ========================================================================== */
.access-section {
  padding: 8rem 0;
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2.5rem;
}

.specs-table th,
.specs-table td {
  padding: 1.25rem 0.75rem;
  border-bottom: 1px solid var(--stone-200);
}

.specs-table th {
  font-family: var(--font-round);
  font-weight: bold;
  color: var(--shuri-red);
  text-align: left;
  width: 32%;
  vertical-align: top;
  letter-spacing: 0.05em;
}

.specs-table td {
  color: var(--sumi-black);
  width: 68%;
}

.tel-note, .closed-note {
  font-size: 0.8rem;
  color: var(--stone-600);
  font-weight: normal;
  display: inline-block;
}

/* Map SVG wrapper */
.map-svg-wrapper {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--stone-200);
}

.map-svg {
  display: block;
}

.map-caption {
  font-size: 0.9rem;
  color: var(--stone-600);
  margin-top: 1.5rem;
  line-height: 1.65;
}

/* Delivery zone map animations */
@keyframes dash {
  to {
    stroke-dashoffset: -40;
  }
}

.map-svg stroke-dasharray {
  animation: dash 5s infinite linear;
}

/* Map Delivery Car Animation */
@keyframes driveAround {
  0% {
    transform: translate(45px, 175px) rotate(0deg);
  }
  25% {
    transform: translate(250px, 185px) rotate(5deg);
  }
  50% {
    transform: translate(210px, 60px) rotate(-10deg);
  }
  75% {
    transform: translate(70px, 80px) rotate(15deg);
  }
  100% {
    transform: translate(45px, 175px) rotate(0deg);
  }
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.site-footer {
  background-color: var(--sumi-black);
  color: var(--stone-300);
  padding: 5.5rem 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3.5rem;
}

.footer-logo-text {
  font-family: var(--font-round);
  font-size: 1.85rem;
  color: var(--washiki-beige);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--stone-600);
}

.footer-meta {
  text-align: right;
}

.footer-address {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--stone-600);
}

/* ==========================================================================
   Scroll-Driven Animations & IntersectionObserver Fallbacks
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  
  .scroll-reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  }
  
  .scroll-reveal.active-reveal {
    opacity: 1;
    transform: translateY(0);
  }
  
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes revealUp {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .scroll-reveal {
      animation: revealUp auto linear forwards;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
      transition: none;
      opacity: 1;
    }
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    font-size: 15px;
  }
  
  .hero-grid {
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .access-grid {
    gap: 3.5rem;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  
  .nav-toggle-btn {
    display: flex;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .panel-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .chef-container-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  
  .speech-bubble::before {
    left: 50%;
    top: -20px;
    transform: translateX(-50%) rotate(90deg);
    border-width: 10px 10px 10px 0;
  }
  
  .speech-bubble::after {
    left: 50%;
    top: -17px;
    transform: translateX(-50%) rotate(90deg);
    border-width: 10px 10px 10px 0;
  }
  
  .radio-group-horizontal {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-row-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .access-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .specs-table th {
    width: 38%;
  }
  
  .specs-table td {
    width: 62%;
  }
  
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-meta {
    text-align: center;
  }
}
