/* ===========================
   Morning Plate 晨盤 — Warm Cozy Brunch Cafe
   B05 Template — Dual-Image Hero, Tabbed Menu, Day Timeline
   =========================== */

/* ============ CSS Variables ============ */
:root {
  --bg: #faf6f0;
  --bg-alt: #f3ece2;
  --bg-card: #ffffff;
  --text: #3d3226;
  --text-muted: #8a7d6d;
  --accent: #d4854a;
  --accent-hover: #c27539;
  --accent-light: #faeee4;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(61, 50, 38, 0.08);
  --shadow-lg: 0 12px 48px rgba(61, 50, 38, 0.12);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(250, 246, 240, 0.96);
  box-shadow: 0 1px 12px rgba(61, 50, 38, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.nav-logo em {
  font-style: normal;
  font-weight: 300;
  color: var(--text-muted);
  margin-left: 2px;
}

.nav-logo-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links li a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.nav-links li a:hover {
  color: var(--text);
  background: var(--accent-light);
}

/* Nav CTA button */
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px !important;
  background: var(--accent);
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.btn-nav:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

.btn-nav svg {
  flex-shrink: 0;
}

/* ============ MOBILE HAMBURGER ============ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  border-radius: 50%;
  border: 1px solid rgba(61, 50, 38, 0.15);
  z-index: 1001;
  transition: all 0.3s var(--ease);
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: all 0.35s var(--ease);
}

.nav-toggle span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 5px));
}

.nav-toggle span:nth-child(3) {
  transform: translate(-50%, calc(-50% + 5px));
}

body.menu-open .nav-toggle span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ============ MOBILE MENU ============ */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: all 0.4s var(--ease);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.mobile-menu a {
  display: block;
  padding: 16px 40px;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
}

.mobile-menu a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  padding: 14px 32px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 133, 74, 0.3);
}

.btn-full {
  width: 100%;
}

/* ============ HERO — Dual Image ============ */
.hero {
  padding-top: 112px;
  padding-bottom: 80px;
  background: var(--bg);
}

.hero-images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.hero-img-wrap:hover img {
  transform: scale(1.05);
}

.hero-title-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: rgba(61, 50, 38, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 32px 48px;
  border-radius: var(--radius);
  text-align: center;
}

.hero-title-card h1 {
  font-family: var(--sans);
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero-info {
  text-align: center;
}

.hero-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.8;
}

/* ============ SECTION TITLES ============ */
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* ============ MENU — Tabbed ============ */
.menu-section {
  padding: 100px 0;
  background: var(--bg-alt);
}

.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.menu-tab {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.menu-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.menu-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Menu panels show/hide */
.menu-panel {
  display: none;
}

.menu-panel.active {
  display: block;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.menu-card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.menu-card:hover .menu-card-img img {
  transform: scale(1.08);
}

.menu-card-body {
  padding: 20px 24px 24px;
}

.menu-card-body h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.menu-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.menu-price {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}

/* ============ SPECIALS — Featured Dish ============ */
.specials-section {
  padding: 100px 0;
  background: var(--bg);
}

.special-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--accent-light);
}

.special-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.special-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.special-card:hover .special-card-img img {
  transform: scale(1.06);
}

.special-card-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 4px solid var(--accent);
}

.special-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
  width: fit-content;
}

.special-card-body h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.special-card-body p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.special-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.special-price {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.special-limit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: 100px;
}

/* ============ STORY — Day Timeline ============ */
.story-section {
  padding: 100px 0;
  background: var(--bg-alt);
}

.timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding-top: 40px;
  margin-top: 20px;
}

/* Connecting horizontal line */
.timeline::before {
  content: '';
  position: absolute;
  top: 58px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent), var(--accent-light));
  z-index: 0;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
  box-shadow: 0 2px 12px rgba(212, 133, 74, 0.2);
  transition: all 0.3s var(--ease);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.timeline-time {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.timeline-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 120px;
}

/* ============ SPACE — Photo Grid ============ */
.space-section {
  padding: 100px 0;
  background: var(--bg);
}

.space-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.space-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.space-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.space-item:hover img {
  transform: scale(1.06);
}

.space-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(61, 50, 38, 0.75));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ============ RESERVATION ============ */
.reservation-section {
  padding: 100px 0;
  background: var(--bg-alt);
}

.reservation-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.reservation-info {
  padding: 48px 40px;
  background: var(--accent);
  color: #fff;
}

.reservation-info h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  line-height: 1.4;
}

.reservation-info ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reservation-info li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.92;
}

.reservation-info li svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.85;
}

/* Form */
.reservation-form {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(61, 50, 38, 0.12);
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 133, 74, 0.15);
}

.form-group textarea {
  resize: vertical;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7d6d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(61, 50, 38, 0.08);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(61, 50, 38, 0.12);
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(61, 50, 38, 0.06);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for menu cards */
.menu-grid .menu-card.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.menu-grid .menu-card.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.menu-grid .menu-card.reveal:nth-child(4) {
  transition-delay: 0.15s;
}

.menu-grid .menu-card.reveal:nth-child(5) {
  transition-delay: 0.25s;
}

.menu-grid .menu-card.reveal:nth-child(6) {
  transition-delay: 0.35s;
}

/* ============ RESPONSIVE — 1024px ============ */
@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .special-card {
    grid-template-columns: 1fr;
  }

  .special-card-img {
    aspect-ratio: 16 / 9;
  }

  .special-card-body {
    border-left: none;
    border-top: 4px solid var(--accent);
    padding: 36px 32px;
  }

  .timeline {
    gap: 12px;
  }

  .timeline::before {
    left: 24px;
    right: 24px;
  }

  .timeline-time {
    font-size: 17px;
  }

  .timeline-text {
    font-size: 12px;
  }

  .timeline-dot {
    width: 40px;
    height: 40px;
  }

  .timeline-dot svg {
    width: 16px;
    height: 16px;
  }

  .reservation-card {
    grid-template-columns: 1fr;
  }

  .reservation-info {
    padding: 36px 32px;
  }

  .reservation-form {
    padding: 36px 32px;
  }

  .hero-title-card {
    padding: 24px 32px;
  }

  .hero-title-card h1 {
    font-size: clamp(18px, 2.8vw, 28px);
  }
}

/* ============ RESPONSIVE — 768px ============ */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-inner {
    height: 64px;
  }

  /* Hero */
  .hero {
    padding-top: 96px;
    padding-bottom: 56px;
  }

  .hero-images {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-img-wrap {
    aspect-ratio: 16 / 9;
  }

  .hero-img-right {
    display: none;
  }

  .hero-title-card {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: -40px;
    margin-left: 16px;
    margin-right: 16px;
    z-index: 2;
  }

  .hero-title-card h1 {
    font-size: 22px;
    white-space: normal;
  }

  .hero-info {
    margin-top: 24px;
  }

  .hero-desc {
    font-size: 14px;
  }

  /* Sections */
  .menu-section,
  .specials-section,
  .story-section,
  .space-section,
  .reservation-section {
    padding: 72px 0;
  }

  .section-title {
    font-size: clamp(24px, 6vw, 32px);
  }

  .section-subtitle {
    font-size: 14px;
    margin-bottom: 36px;
  }

  /* Menu */
  .menu-tabs {
    gap: 6px;
    margin-bottom: 32px;
  }

  .menu-tab {
    padding: 10px 20px;
    font-size: 13px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Timeline — vertical on mobile */
  .timeline {
    flex-direction: column;
    gap: 0;
    padding-top: 0;
    padding-left: 32px;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 23px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .timeline-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 16px 0;
  }

  .timeline-dot {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .timeline-dot svg {
    width: 16px;
    height: 16px;
  }

  .timeline-time {
    font-size: 16px;
    margin-bottom: 0;
    min-width: 52px;
  }

  .timeline-text {
    max-width: none;
    font-size: 14px;
  }

  /* Space */
  .space-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Special */
  .special-card-body {
    padding: 28px 24px;
  }

  .special-price {
    font-size: 26px;
  }

  /* Reservation */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .reservation-info {
    padding: 28px 24px;
  }

  .reservation-form {
    padding: 28px 24px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-brand .nav-logo {
    justify-content: center;
  }
}

/* ============ RESPONSIVE — 480px ============ */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title-card {
    padding: 20px 24px;
    margin-left: 8px;
    margin-right: 8px;
  }

  .hero-title-card h1 {
    font-size: 19px;
  }

  .menu-tab {
    padding: 8px 16px;
    font-size: 12px;
  }

  .special-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mobile-menu a {
    font-size: 18px;
    padding: 14px 32px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}