/* ═══════════════════════════════════════════════════════════
   style.css — all structural styles
   Color tokens come from theme-teal.css or theme-rose.css
   ═══════════════════════════════════════════════════════════ */

/* ═══ HIDDEN THEME EGG ═══════════════════════════════════ */
#theme-egg {
  position: fixed;
  top: 0;
  right: 0;
  width: 56px;
  height: 72px;
  z-index: 9999;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: "Outfit", sans-serif;
  background: var(--cream);
  color: var(--dark);
  min-height: 100vh;
  padding-bottom: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ═══ TOP BAR ═════════════════════════════════════════════ */
.top-stripe {
  display: flex;
  height: 4px;
}
.top-stripe .s1 { flex: 1; background: var(--flag-green); }
.top-stripe .s2 { flex: 1; background: var(--white); }
.top-stripe .s3 { flex: 1; background: var(--flag-red); }

.top-bar {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  max-width: 900px;
  margin: 0 auto;
}
.tb-logo {
  height: 36px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
}
@media (min-width: 700px) {
  .top-bar-inner { padding: 16px 24px; }
  .tb-logo { height: 56px; }
}
.tb-badge {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 12px;
  flex-shrink: 0;
}

/* ═══ VIEWS ═══════════════════════════════════════════════ */
#home-view    { display: block; }
#grid-view    { display: none; }
#detail-view  { display: none; }
#program-view { display: none; }

/* ═══ HOME ════════════════════════════════════════════════ */
.home-hero {
  background: var(--primary-dark);
  position: relative;
  text-align: center;
  overflow: hidden;
}
.home-hero-ghost {
  display: block;
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.ghost-1 { opacity: 0.28; }
.ghost-2 { opacity: 0.18; }
.ghost-3 { opacity: 0.11; }
.ghost-4 { opacity: 0.06; }
.home-hero-deco {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.home-hero-text {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1;
}
.home-hero-ita {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}
.home-pavilion {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.home-pavilion em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
}
.home-fair {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 10px;
}
@media (min-width: 700px) {
  .home-hero-ita  { height: 60px; margin-bottom: 24px; }
  .home-pavilion  { font-size: 4rem; }
  .home-fair      { font-size: 0.8rem; margin-top: 14px; }
}

/* ═══ SCROLL INDICATOR ══════════════════════════════════════ */
.scroll-indicator { display: none; }
@media (min-width: 700px) {
  .scroll-indicator {
    position: fixed;
    bottom: calc(var(--nav-h) + 24px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    z-index: 150;
    animation: scrollBounce 2s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s;
  }
  .scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
  }
}
.scroll-indicator svg {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.7);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
}
.scroll-indicator-label {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);  opacity: 0.7; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ═══ NAV STRIPE ═══════════════════════════════════════════ */
.nav-stripe { display: flex; height: 4px; width: 100%; flex-shrink: 0; }
.nav-stripe .s1 { flex: 1; background: var(--flag-green); }
.nav-stripe .s2 { flex: 1; background: var(--white); }
.nav-stripe .s3 { flex: 1; background: var(--flag-red); }

/* ═══ HOME CONTENT ════════════════════════════════════════ */
.home-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}
.home-tagline {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.home-tagline-label {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.home-tagline-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--primary-dark);
  line-height: 1.45;
}
.home-body p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--mid);
  margin-bottom: 14px;
}
.home-note {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 12px 14px;
  background: var(--primary-light);
  border-radius: 4px;
  border-left: 3px solid var(--primary);
  margin-top: 4px;
  margin-bottom: 0;
  line-height: 1.5;
}
.home-cta {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 15px;
  background: var(--primary-dark);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.home-cta:hover  { filter: brightness(0.88); }
.home-cta:active { filter: brightness(0.78); }

.home-office {
  margin-top: 24px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.home-office-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.home-office-logo img {
  height: 70px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}
@media (min-width: 400px) {
  .home-office-logo img { height: 90px; max-width: 130px; }
}
.home-office-info {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--mid);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.home-office-info strong {
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}
.home-office-info a { color: var(--primary); text-decoration: none; }

/* ═══ GRID ════════════════════════════════════════════════ */
.grid-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 14px 24px;
  overflow-x: hidden;
}
.section-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-tag span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}
.section-tag::before,
.section-tag::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.companies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 400px) { .companies-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 600px) { .companies-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .companies-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }

/* ═══ CARD ════════════════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.97); box-shadow: none; }
@media (hover: hover) {
  .card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
  }
}
.card-logo-area {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.card-logo-area img {
  max-height: 160px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
@media (min-width: 400px) {
  .card-logo-area { height: 130px; padding: 16px; }
  .card-logo-area img { max-height: 96px; }
}
@media (min-width: 700px) {
  .card-logo-area { height: 180px; padding: 20px; }
  .card-logo-area img { max-height: 130px; }
}
.card-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.card-info {
  padding: 9px 10px 11px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-sector {
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1px;
}
.card-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
.card-location {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 5px;
}

/* ═══ DETAIL ══════════════════════════════════════════════ */
.detail-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 28px;
  animation: fadeup 0.25s ease;
  overflow-x: hidden;
}
@keyframes fadeup {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  padding: 8px 0;
  margin-bottom: 14px;
  -webkit-tap-highlight-color: transparent;
}
.detail-top-logo {
  margin-bottom: 16px;
  padding: 24px 20px;
  text-align: center;
}
.detail-top-logo img {
  max-height: 140px;
  max-width: 320px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.detail-sector-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.detail-name {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
}

/* ═══ PHOTOS ══════════════════════════════════════════════ */
.detail-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.detail-photos.single { grid-template-columns: 1fr; }
.detail-photo {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--primary-light);
  cursor: zoom-in;
  position: relative;
}
.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.detail-photo:hover img { transform: scale(1.03); }
.detail-photos.contain .detail-photo { background: var(--white); }
.detail-photos.contain .detail-photo img { object-fit: contain; padding: 8px; }

/* ═══ LIGHTBOX ═══════════════════════════════════════════════ */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#lightbox.open { display: flex; }
#lightbox-img {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.18);
  user-select: none;
  -webkit-user-drag: none;
}
#lightbox-counter {
  margin-top: 12px;
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.07);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { background: rgba(0, 0, 0, 0.14); }
#lb-prev { left: 14px; }
#lb-next { right: 14px; }
#lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.07);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
#lb-close:hover { background: rgba(0, 0, 0, 0.14); }

/* ═══ DESCRIPTION ════════════════════════════════════════ */
.desc-block { display: none; }
.desc-block.visible { display: block; }
.desc-block p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--mid);
  margin-bottom: 16px;
}

/* ═══ CONTACTS ═══════════════════════════════════════════ */
.contacts-title {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  margin-top: 4px;
}
.contact-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  min-width: 0;
}
.contact-row:last-child { border-bottom: none; }
.c-icon {
  width: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-top: 1px;
}
.c-val {
  color: var(--dark);
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.55;
  min-width: 0;
  flex: 1;
}
.c-val a { color: var(--primary); text-decoration: none; }
.c-val small { font-size: 0.78rem; color: var(--muted); }

.ita-chip {
  margin-top: 20px;
  background: var(--primary-light);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--primary-dark);
}
.ita-chip a { color: var(--primary); text-decoration: none; }

/* ═══ PROGRAM ════════════════════════════════════════════ */
.program-hero {
  position: relative;
  background: var(--white);
  overflow: hidden;
  text-align: center;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.program-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%;       /* extra height so parallax shift never shows a gap */
  top: -7.5%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  will-change: transform;
}
.program-hero-text {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  color: var(--dark);
}
.program-hero-label {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.program-hero-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary-dark);
}
.program-hero-dates {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.program-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.program-section-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.program-section-tag::before,
.program-section-tag::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.program-section-tag span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}
.program-day {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.program-day-header {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 8px 16px;
}
.program-slot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.program-slot:last-child { border-bottom: none; }
.program-time {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 1px;
  min-width: 88px;
}
.program-dish {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--dark);
}
.program-tasting-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.program-tasting-item {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--dark);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 28px;
}
.program-tasting-item:last-child { border-bottom: none; }
.program-tasting-item::before {
  content: "·";
  position: absolute;
  left: 14px;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
}

/* ═══ BOTTOM NAV ══════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + 4px);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.nav-buttons { flex: 1; display: flex; }
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
  body { padding-bottom: calc(var(--nav-h) + 4px + env(safe-area-inset-bottom)); }
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  color: var(--muted);
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 0;
}
.nav-btn.active { color: var(--primary); }
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn span {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
