/* ==========================================================================
   theme.css — Konamaru. A neighbourhood okonomiyaki place: mayo-cream
   walls, sauce-brown ink, pickled-ginger red and aonori green. Everything
   is round, because the food is. The one loud thing is the toppings tray
   ("Lägg till"), a dark sauce-brown panel of pills: okonomi = as you like.

   Contrast: ink #3A2418 on cream #FBF2DC 13:1; muted #6A4C3B on cream 6.6:1;
   white on ginger #C0301F 5.6:1; cream on nori #2F4A1E 9:1; nori text #4A6624
   on cream 5.5:1.

   1. Variables   2. Base   3. Pieces   4. Sections in page order
   5. Wider screens   6. Motion
   ========================================================================== */

/* ---- 1. Variables -------------------------------------------------------- */

:root {
  color-scheme: light;

  --cream: #FBF2DC;
  --paper: #FFFAEB;
  --ink: #3A2418;
  --muted: #6A4C3B;
  --sauce: #7A3A1A;
  --ginger: #C0301F;
  --nori: #2F4A1E;
  --nori-text: #4A6624;
  --mayo: #FFE29A;
  --line: #E6D2A6;

  --font-latin: 'Nunito', 'Zen Maru Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Fredoka', 'Zen Maru Gothic', 'Nunito', system-ui, sans-serif;
  --font-ja: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', sans-serif;

  --gutter: 1.125rem;
  --page-max: 64rem;
  --radius: 1.75rem;
  --space-section: 3.5rem;

  /* Variables read by base.css */
  --focus-color: #3A2418;
  --focus-width: 3px;
  --focus-offset: 3px;
  --actionbar-height: 3.5rem;
  --ja-line-height: 1.8;
  --ja-letter-spacing: 0.02em;
  --demo-bg: #3A2418;
  --demo-fg: #FBF2DC;
  --demo-font: var(--font-latin);
  --demo-radius: 999px;
  --demo-font-size: 0.75rem;
}

/* ---- 2. Base ------------------------------------------------------------- */

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
}

html[data-lang="ja"] body {
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 500;
  line-height: var(--ja-line-height);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- 3. Pieces ----------------------------------------------------------- */

.title,
.hero__headline,
.cat__name,
.brand__name,
.footer__latin,
.item__amount {
  font-family: var(--font-head);
  font-weight: 600;
}

html[data-lang="ja"] .title,
html[data-lang="ja"] .hero__headline,
html[data-lang="ja"] .cat__name,
html[data-lang="ja"] .brand__name,
html[data-lang="ja"] .footer__latin,
html[data-lang="ja"] .item__name,
html[data-lang="ja"] .point__label,
html[data-lang="ja"] .details dt,
html[data-lang="ja"] .subtitle {
  font-family: var(--font-ja);
  font-weight: 700;
}

.title {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

html[data-lang="ja"] .title {
  font-size: 1.75rem;
  line-height: 1.5;
}

.subtitle {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.button:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}

.button--primary {
  background: var(--ginger);
  color: #fff;
}

/* ---- 4. Sections --------------------------------------------------------- */

/* 0 · notice */
.notice {
  padding: 0.625rem var(--gutter);
  background: var(--mayo);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

/* 1 · header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--page-max);
  margin: 0 auto;
  min-height: 3.5rem;
  padding: 0.25rem calc(var(--gutter) - 0.25rem) 0.25rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
}

.brand__name {
  font-size: 1.375rem;
  line-height: 1;
}

.brand__ja {
  color: var(--muted);
  font-family: var(--font-ja);
  font-size: 0.875rem;
  font-weight: 700;
}

.nav {
  display: none;
  margin-left: auto;
}

.nav__list {
  display: flex;
  gap: 0.25rem;
}

.nav__link {
  padding: 0 0.875rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
}

.nav__link:hover {
  background: var(--mayo);
}

.lang {
  display: flex;
  gap: 0.125rem;
}

.lang__button {
  min-width: 2.75rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.lang__button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}

/* 2 · hero */
.hero {
  padding: 1.25rem var(--gutter) 3rem;
  overflow: hidden;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: var(--page-max);
  margin: 0 auto;
}

.hero__headline {
  font-size: 2.75rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  word-spacing: 0.14em;
}

html[data-lang="ja"] .hero__headline {
  word-spacing: normal;
  font-size: 2.125rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.hero__sub {
  max-width: 30rem;
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

html[data-lang="ja"] .hero__sub {
  font-size: 0.9375rem;
}

.status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.125rem 0.5rem;
  margin-top: 1rem;
  padding: 0.375rem 0.875rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

.status__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--ginger);
}

.status[data-state="open"] .status__dot {
  background: #4C8A2B;
}

.status__detail {
  color: var(--muted);
  font-weight: 400;
}

html[data-lang="ja"] .status__detail {
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.hero__actions .button {
  flex: 1 1 9rem;
}

/* The pan sits on a round iron plate with a handle, like the real thing. */
.hero__art {
  position: relative;
  align-self: center;
  width: min(78vw, 22rem);
  aspect-ratio: 1;
  margin-right: 1.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5A4034, var(--ink) 70%);
  box-shadow: 0 6px 0 rgb(58 36 24 / 0.25);
  isolation: isolate;
}

.hero__art::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.75rem;
  width: 2.75rem;
  height: 1rem;
  margin-top: -0.5rem;
  border-radius: 0 999px 999px 0;
  background: var(--ink);
  z-index: -1;
}

.hero__pan {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  transform: rotate(-8deg);
}

/* 3 · concept: a paper panel */
.band {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-section) var(--gutter);
}

.concept,
.visit {
  margin-left: var(--gutter);
  margin-right: var(--gutter);
  padding: 2rem 1.375rem;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--line);
}

.concept__body {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
  margin-top: 1.125rem;
}

.points {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.point {
  padding: 0.875rem 1.125rem;
  border-radius: 1.25rem;
  background: var(--cream);
}

.point__label {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
}

.point__text {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* 4 · menu */
.menu {
  padding-top: 4rem;
}

.menu__intro {
  max-width: 36rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.menu__sheet {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

.cat__head {
  margin-bottom: 0.875rem;
}

.cat__name {
  font-size: 1.5rem;
  line-height: 1.2;
}

html[data-lang="ja"] .cat__name {
  font-size: 1.375rem;
}

.cat__note {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.items {
  display: grid;
  gap: 0.625rem;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
}

.item__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.item__desc {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.item__price {
  text-align: right;
  white-space: nowrap;
}

.item__amount {
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.item__price-note {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.tag {
  padding: 0.0625rem 0.625rem;
  border-radius: 999px;
  background: #E3EBC8;
  color: var(--nori);
  font-family: var(--font-latin);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

html[data-lang="ja"] .tag {
  font-family: var(--font-ja);
}

.tag[data-tag="signature"] {
  background: var(--mayo);
  color: var(--ink);
}

/* Okonomiyaki: round cards, the price is a round stamp. */
.cat[data-category="okonomiyaki"] .item {
  padding: 1rem 1rem 1rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 1.5rem;
  background: var(--paper);
}

.cat[data-category="okonomiyaki"] .item__price {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--mayo);
  box-shadow: 0 0 0 2px var(--ink) inset;
  text-align: center;
  transform: rotate(-6deg);
}

.cat[data-category="okonomiyaki"] .item__amount {
  font-size: 1.1875rem;
  line-height: 1;
}

/* The toppings tray: the loud part. */
.cat[data-category="toppings"] {
  position: relative;
  padding: 1.75rem 1.25rem 1.875rem;
  border-radius: var(--radius);
  background: var(--sauce);
  color: var(--cream);
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--sauce);
}

.cat[data-category="toppings"] .cat__name {
  font-size: 2rem;
}

html[data-lang="ja"] .cat[data-category="toppings"] .cat__name {
  font-size: 1.75rem;
}

.cat[data-category="toppings"] .cat__note {
  color: var(--mayo);
  font-size: 1rem;
  font-weight: 700;
}

.cat[data-category="toppings"] .items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.125rem;
}

.cat[data-category="toppings"] .item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.375rem 0.25rem 1rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
}

.cat[data-category="toppings"] .item__name {
  font-size: 1.0625rem;
}

.cat[data-category="toppings"] .item__price {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--ginger);
  color: #fff;
}

.cat[data-category="toppings"] .item__amount {
  font-size: 0.9375rem;
}

.cat[data-category="toppings"] .item__amount::before {
  content: "+";
}

/* Lunch: a ticket. */
.cat[data-category="lunch"] {
  padding: 1.25rem 1.25rem 1.25rem;
  border: 3px dashed var(--ginger);
  border-radius: var(--radius);
  background: var(--mayo);
}

.cat[data-category="lunch"] .cat__head {
  margin-bottom: 0.5rem;
}

.cat[data-category="lunch"] .item__name {
  font-size: 1.25rem;
}

.cat[data-category="lunch"] .item__amount {
  font-size: 2.25rem;
  line-height: 1;
}

.cat[data-category="lunch"] .item__desc {
  color: var(--ink);
}

/* The rest: plain rows with a dotted leader. */
.cat[data-category="yakisoba"] .items,
.cat[data-category="small"] .items,
.cat[data-category="drinks"] .items {
  gap: 0;
}

.cat[data-category="yakisoba"] .item,
.cat[data-category="small"] .item,
.cat[data-category="drinks"] .item {
  padding: 0.75rem 0;
  border-bottom: 2px dotted var(--line);
  align-items: baseline;
}

.cat[data-category="yakisoba"] .item:last-child,
.cat[data-category="small"] .item:last-child,
.cat[data-category="drinks"] .item:last-child {
  border-bottom: 0;
}

.cat[data-category="yakisoba"] .item__name,
.cat[data-category="small"] .item__name,
.cat[data-category="drinks"] .item__name {
  font-size: 1.0625rem;
}

.menu__note {
  max-width: 38rem;
  margin-top: 2.25rem;
  padding: 0.875rem 1.125rem;
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* 5 · gallery: three round stickers */
.gallery {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
}

.gallery .title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery__list {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
}

.gallery__item {
  flex: 0 1 8.5rem;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--line);
}

.gallery__item:nth-child(1) {
  transform: rotate(-5deg);
}

.gallery__item:nth-child(3) {
  transform: rotate(5deg);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav__list li:has(a[href="#gallery"]) {
  display: none;
}

/* 6 · visit */
.visit {
  margin-top: var(--space-section);
}

.visit .subtitle:first-of-type {
  margin-top: 1.25rem;
}

.hours {
  margin-top: 0.5rem;
}

.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 2px dotted var(--line);
}

.hours__row:last-child {
  border-bottom: 0;
}

.hours__days {
  font-weight: 700;
}

.hours__time {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hours__period {
  display: block;
}

.hours__row[data-closed="true"] {
  color: var(--muted);
}

.hours__row[data-today="true"] {
  margin: 0 -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  border-radius: 1rem;
  background: var(--mayo);
}

.visit__note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.visit__address {
  display: grid;
  gap: 0.125rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.visit__directions {
  display: grid;
  gap: 0.375rem;
  margin: 0.875rem 0 1.5rem;
  color: var(--muted);
}

/* 7 · booking: aonori-green panel */
.booking {
  margin: var(--space-section) var(--gutter) 0;
  padding: 2rem 1.375rem;
  border-radius: var(--radius);
  background: var(--nori);
  color: var(--cream);
}

@media (min-width: 64em) {
  .booking {
    margin-left: auto;
    margin-right: auto;
  }
}

.booking__body {
  max-width: 36rem;
  margin-top: 0.875rem;
}

.channels {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.channel {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  border-color: var(--ink);
}

.channels li:first-child .button {
  background: var(--mayo);
}

.channel__label {
  font-size: 0.875rem;
}

.channel__value {
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

.details {
  margin-top: 2rem;
}

.details__row {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem 0;
  border-top: 2px dotted rgb(251 242 220 / 0.35);
}

.details dt {
  color: var(--mayo);
  font-size: 0.9375rem;
  font-weight: 700;
}

.details dd {
  font-weight: 500;
}

/* 8 · footer */
.footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 6rem;
}

.footer__name {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

.footer__latin {
  font-size: 1.375rem;
}

.footer__ja {
  color: var(--muted);
  font-family: var(--font-ja);
  font-weight: 700;
}

.footer__contact {
  margin-top: 0.75rem;
  font-weight: 700;
}

.footer__contact a {
  justify-content: flex-start;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.footer__legal {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Mobile action bar */
.actionbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  background: var(--cream);
  border-top: 2px solid var(--line);
}

.actionbar__item {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.actionbar__item[data-primary="true"] {
  background: var(--ginger);
  color: #fff;
}

.demo-badge__label {
  box-shadow: none;
  font-weight: 700;
}

/* ---- 5. Wider screens ---------------------------------------------------- */

@media (min-width: 48em) {
  :root {
    --gutter: 1.5rem;
    --space-section: 5rem;
  }

  .header {
    padding: 0.5rem 1.5rem;
  }

  .nav {
    display: block;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
  }

  .hero__text {
    flex: 1 1 0;
  }

  .hero__headline {
    font-size: 3.75rem;
  }

  html[data-lang="ja"] .hero__headline {
    font-size: 2.75rem;
  }

  .hero__sub {
    font-size: 1.1875rem;
  }

  html[data-lang="ja"] .hero__sub {
    font-size: 1rem;
  }

  .hero__actions .button {
    flex: 0 0 auto;
  }

  .hero__art {
    flex: 0 0 22rem;
    width: 22rem;
    margin-right: 1.75rem;
  }

  .title {
    font-size: 2.5rem;
  }

  html[data-lang="ja"] .title {
    font-size: 2.125rem;
  }

  .concept,
  .visit,
  .booking {
    padding: 3rem 3rem;
  }

  /* One column width for every block: panels and the menu line up. */
  .concept,
  .visit,
  .booking,
  .menu {
    width: min(100% - 2 * var(--gutter), var(--page-max));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .menu {
    padding-left: 0;
    padding-right: 0;
  }

  .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat[data-category="okonomiyaki"] .items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }

  .cat[data-category="toppings"] {
    padding: 2.25rem 2.25rem 2.5rem;
  }

  .menu__sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 3.5rem;
  }

  .cat[data-category="okonomiyaki"],
  .cat[data-category="toppings"] {
    grid-column: 1 / -1;
  }

  .details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
  }

  .footer {
    padding-bottom: 4rem;
  }

  .channels {
    grid-template-columns: repeat(2, minmax(0, 20rem));
  }

  .gallery__item {
    flex-basis: 11rem;
  }
}

/* ---- 6. Motion ----------------------------------------------------------- */

/* One moment: the okonomiyaki is flipped onto the plate when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .hero__pan {
    animation: flip 0.9s cubic-bezier(0.2, 0.8, 0.3, 1.2) 0.15s both;
  }

  @keyframes flip {
    from {
      transform: rotate(-160deg) scale(0.92);
    }

    to {
      transform: rotate(-8deg) scale(1);
    }
  }
}
