:root {
  --font-heading: "Bakbak One", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
  --color-primary: #EF9A30;
  --color-dark: #1B1B1F;
  --color-accent: #EF4D5C;
  --color-blue: #045FB1;
  --color-blue-border: #2E7FD1;
  --color-navy: #0C2D52;
  --color-red: #E52332;
  --color-slate: #5B6675;
  --color-yellow: #EFC42A;
  --radius-lg: 1.5rem; /* 24px */
  --radius-md: 0.5rem; /* 8px */
  --gap: 0.75rem; /* 12px */
  --card-width: 26.5rem; /* 424px, Order Up card width */
}

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

body {
  font-family: var(--font-body);
  background-color: #000;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 11.25rem var(--card-width) 1fr; /* 180px | 424px | remaining space */
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header nav    nav"
    "header main   aside"
    "header footer footer";
  gap: var(--gap);
}

.site-nav {
  grid-area: nav;
}

.site-main {
  grid-area: main;
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.site-aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.site-footer {
  grid-area: footer;
}

.font-jp {
  font-family: var(--font-jp);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Header / sidebar */

.site-header {
  grid-area: header;
  align-self: start;
  position: sticky;
  top: 0;
  /* Equal top and bottom rows keep the brand centered; the logo sits at the bottom */
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  width: 11.25rem; /* 180px */
  height: 100vh;
  padding: 1.5rem 0;
  background: var(--color-primary);
  border-radius: var(--radius-lg);
}

/* Hidden on desktop, where the nav is always visible; shown below 768px */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem; /* 5px */
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 1.5rem; /* 24px */
  height: 0.125rem; /* 2px */
  background: var(--color-dark);
  border-radius: 0.125rem;
}

.site-header__brand {
  grid-row: 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 6vw, 6rem); /* scales up to 96px on wide screens */
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  color: #000;
}

.site-header__logo {
  grid-row: 3;
  align-self: end;
  display: block;
  width: 2.5rem; /* 40px */
  height: 2.5rem;
}

/* Order Up card */

.card--order-up {
  max-width: var(--card-width);
  padding: 2rem 2rem 0;
  background: var(--color-blue);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card__icon {
  width: 3.5rem; /* 56px */
  height: 3.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-navy);
  border-radius: 0.75rem; /* 12px */
}

.card__title {
  margin-bottom: 1rem;
  color: #fff;
  font-size: 2.5rem; /* 40px */
  font-weight: 400;
}

.card__text {
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.5;
}

.card__arrow {
  display: block;
  width: 100%;
  height: 1rem;
  margin: 1.5rem 0 2rem;
  color: #fff;
}

.card__pattern {
  height: 2rem; /* 32px */
  margin: 0 -2rem;
  background-image:
    linear-gradient(45deg, var(--color-navy) 25%, transparent 25%),
    linear-gradient(-45deg, var(--color-navy) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--color-navy) 75%),
    linear-gradient(-45deg, transparent 75%, var(--color-navy) 75%);
  background-size: 1.5rem 1.5rem;
  background-position: 0 0, 0 0.75rem, 0.75rem -0.75rem, -0.75rem 0;
}

/* Now Serving banner */

.card--now-serving {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 8.5rem; /* 136px */
  padding: 1.25rem 1.5rem;
  background: var(--color-red);
  border-radius: var(--radius-lg);
}

.card--now-serving__label {
  color: #fff;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Sign */

.sign {
  position: relative;
  width: 12.5rem; /* 200px */
  height: 12.5rem;
  padding: 0.875rem;
  background: var(--color-yellow);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Stand-in for the bird/fish emblem in the reference sign */
.sign__bird {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 2rem;
  height: 1.5rem;
  background: var(--color-dark);
  border-radius: 0.375rem;
}

.sign__text {
  line-height: 1;
}

.sign__text--accent {
  margin-top: 1.5rem;
  margin-right: 2.25rem; /* clears the bird placeholder */
  color: var(--color-red);
  font-size: 2.5rem;
  font-weight: 900;
}

.sign__text--dark {
  margin-top: 0.25rem;
  color: var(--color-dark);
  font-size: 2.75rem;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.sign__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  background: var(--color-red);
}

.sign__text--light {
  color: #fff;
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Channel / TV screen */

.channel {
  width: 100%;
  max-width: var(--card-width);
  padding: 2rem;
  background: var(--color-slate);
  border-radius: var(--radius-lg);
}

.channel__screen {
  position: relative;
  width: 100%;
  max-width: 12.5rem; /* 200px */
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-md);
}

/* Fills the screen with whichever media element JS injects: <video> (self-hosted) or <iframe> (third-party embed) */
.channel__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.channel__static {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-color: #000;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 0.0625rem, transparent 0.0625rem 0.125rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 0.0625rem, transparent 0.0625rem 0.1875rem);
  background-size: 100% 0.1875rem, 0.1875rem 100%;
}

/* JS toggles .is-switching on .channel__screen to play the static flash between channel changes */
.channel__screen.is-switching .channel__static {
  animation:
    channel-static-noise 0.12s steps(2) infinite,
    channel-static-flash 0.4s ease-in-out;
}

@keyframes channel-static-noise {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0.1875rem, 0.1875rem 0; }
}

@keyframes channel-static-flash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* Below 768px: header collapses to a full-width bar at the top */
@media (max-width: 48em) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
      "header"
      "nav"
      "main"
      "aside"
      "footer";
  }

  .site-header {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: auto;
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .site-header__brand {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .card--order-up {
    max-width: 100%;
    padding: 1.5rem 1.5rem 0;
  }

  .card__pattern {
    margin: 0 -1.5rem;
  }

  .card__title {
    font-size: 2rem; /* 32px */
  }
}

/* ==========================================================================
   Site shell: nav, footer and inner-page layout
   ========================================================================== */

a {
  color: inherit;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 0.75rem 1rem;
  background: var(--color-dark);
  border-radius: var(--radius-lg);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-dark);
  background: var(--color-primary);
}

.site-nav__cta {
  padding: 0.5rem 1.25rem;
  color: #fff;
  font-family: var(--font-heading);
  text-decoration: none;
  background: var(--color-red);
  border-radius: 999px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  background: var(--color-dark);
  border-radius: var(--radius-lg);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Inner pages: main content spans both the main and aside columns */
body.page-inner {
  grid-template-areas:
    "header nav    nav"
    "header main   main"
    "header footer footer";
}

.page-inner .site-main {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

/* ==========================================================================
   Wireframe blocks for dummy page layouts (swap for real components later)
   ========================================================================== */

.page-hero {
  position: relative;
  padding: 2.5rem 2rem;
  color: #fff;
  background: var(--color-blue);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.page-hero--red { background: var(--color-red); }
.page-hero--yellow { color: var(--color-dark); background: var(--color-yellow); }
.page-hero--slate { background: var(--color-slate); }

.page-hero__eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-hero__title {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.page-hero__text {
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.5;
  opacity: 0.9;
}

.section {
  padding: 2rem;
  color: #fff;
  background: #121216;
  border-radius: var(--radius-lg);
}

.section__title {
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: 400;
}

.section__intro {
  max-width: 40rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.wire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--gap);
}

.wire-grid--2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

/* A placeholder box: the label says what content goes here */
.wire {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 8rem;
  padding: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
}

.wire--tall { min-height: 16rem; }
.wire--media { aspect-ratio: 4 / 3; min-height: 0; background: rgba(255, 255, 255, 0.05); }

.wire__label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.wire__note {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.wire__step {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-dark);
  font-family: var(--font-heading);
  background: var(--color-primary);
  border-radius: 50%;
}

.wire-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.wire-button {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.625rem 1.25rem;
  color: #fff;
  font-family: var(--font-heading);
  text-decoration: none;
  background: var(--color-red);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.wire-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.wire-toggle__option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.wire-toggle__option[aria-pressed="true"] {
  color: var(--color-dark);
  background: var(--color-primary);
}

.wire-toggle__badge {
  padding: 0.125rem 0.5rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-red);
  border-radius: 999px;
}

.wire__billing {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.wire-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.wire-chips span {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.wire-form {
  display: grid;
  gap: 1rem;
}

.wire-form label {
  display: grid;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.wire-form input,
.wire-form select,
.wire-form textarea {
  padding: 0.75rem;
  color: #fff;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
}

.wire-form textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Below 768px: nav collapses behind the hamburger */
@media (max-width: 48em) {
  .hamburger {
    display: flex;
  }

  body.page-inner {
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header"
      "nav"
      "main"
      "footer";
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
  }

  .site-nav__cta {
    text-align: center;
  }

  .page-hero,
  .section {
    padding: 1.5rem;
  }
}

.card__title a {
  text-decoration: none;
}

.wire__price {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--color-primary);
}

/* FAQ accordion: native <details>; the shared name lets only one stay open */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.accordion {
  background: #26262D;
  border-radius: var(--radius-md);
}

.accordion__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  list-style: none;
  cursor: pointer;
}

.accordion__question::-webkit-details-marker {
  display: none;
}

.accordion__question::after {
  content: "+";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 1.25rem;
  background: var(--color-primary);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.accordion[open] .accordion__question::after {
  transform: rotate(45deg);
}

.accordion__question:hover,
.accordion__question:focus-visible {
  color: var(--color-primary);
}

.accordion__answer {
  max-width: 44rem;
  padding: 0 1.25rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

/* Custom select: drop the native chrome and draw a chevron to match the text fields */
.wire-form select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23EF9A30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1rem;
  cursor: pointer;
}

/* The open option list uses the OS menu, so give it the dark theme explicitly */
.wire-form option {
  color: #fff;
  background: #26262D;
}

.wire-form input:focus,
.wire-form select:focus,
.wire-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239, 154, 48, 0.25);
}

/* Now Serving: ticket dispenser */

.now-serving__number {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.5rem; /* 40px */
  line-height: 1.1;
}

.now-serving__button {
  margin-top: auto;
  padding: 0.375rem 1rem;
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  background: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.now-serving__button:hover {
  background: var(--color-yellow);
}

.now-serving__button:active {
  transform: scale(0.95);
}

.ticket-dispenser {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 9rem; /* 144px */
  z-index: 5;
}

.ticket-dispenser__slot {
  position: relative;
  z-index: 1;
  height: 1.25rem; /* 20px */
  background: #000;
  border-radius: 0.25rem;
}

/* Starts at the middle of the slot so tickets slide out from inside it */
.ticket-dispenser__track {
  position: absolute;
  top: 0.625rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 12rem;
  overflow: hidden;
  pointer-events: none;
}

.ticket {
  --stub: 0.875rem; /* the strip above the perforation that stays in the slot */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: calc(var(--stub) + 0.75rem) 0.75rem 1rem;
  color: var(--color-dark);
  font-family: var(--font-body);
  text-align: center;
  background: #E4E4E4;
  border: none;
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.35);
  cursor: grab;
  pointer-events: auto;
}

/* Perforation line */
.ticket::before {
  content: "";
  position: absolute;
  top: var(--stub);
  left: 0;
  right: 0;
  height: 2px;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.45) 1px, transparent 1.5px);
  background-size: 0.375rem 2px;
}

.ticket:hover,
.ticket:focus-visible {
  background: #F2F2F2;
}

.ticket__brand {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-red);
}

.ticket__label {
  margin-top: 0.25rem;
  font-size: 0.6875rem; /* 11px */
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1;
}

.ticket__hint {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: var(--color-slate);
}

/* The torn-off half, moved to <body> so it can fall past every container */
.ticket--falling {
  position: fixed;
  z-index: 1000;
  margin: 0;
  clip-path: inset(var(--stub) 0 0 0);
  pointer-events: none;
  transform-origin: 80% 0;
}

/* What stays behind in the slot after a tear */
.ticket--stub {
  clip-path: inset(0 0 calc(100% - var(--stub)) 0);
  box-shadow: none;
  pointer-events: none;
}
