/* The restaurant nav that opens into the booking. One bar of warm glass on a white page: a gradient with a light
   line along the top, a 1px edge, a fine grain and soft shadows in layers. GSAP moves .bar (enter, width) and
   .bar__glass (height and corners); the CSS styles their children. */
:root {
  --page: #ffffff;                        /* the page */
  --glass-top: rgba(255, 253, 249, 0.96); /* the glass, at the top */
  --glass-bottom: rgba(246, 242, 235, 0.96); /* the glass, at the bottom */
  --edge: rgba(52, 40, 28, 0.08);         /* the 1px border */
  --ink: #1f1c18;                         /* the words */
  --muted: #8a8278;                       /* the small words */
  --track: rgba(52, 40, 28, 0.06);        /* the sunken track of the pills */
  --olive: #2f3a2c;                       /* the buttons */
  --olive-deep: #222b20;                  /* the buttons, at the bottom */
  --cream: #f5efe4;                       /* the words on the buttons */
  --terra: #b8643d;                       /* the only warm accent: the leaf and the tables left */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

p,
ul,
figure {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ the bar and its glass */
.bar {
  position: relative;
  width: min(560px, 92vw);
  container-type: inline-size;
  opacity: 0;
}

.bar.is-open {
  width: min(640px, 92vw);
}

.bar__glass {
  --r: 30px;
  position: relative;
  height: 60px;
  border-radius: var(--r);
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(184, 100, 61, var(--warm, 0)) 0%, transparent 60%),
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  box-shadow:
    inset 0 0 0 1px var(--edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(52, 40, 28, 0.04),
    0 1px 2px rgba(52, 40, 28, 0.06),
    0 6px 14px -6px rgba(52, 40, 28, 0.1),
    0 24px 48px -20px rgba(70, 48, 26, 0.2),
    0 50px 90px -40px rgba(70, 48, 26, 0.16);
  transition: box-shadow 0.45s ease;
}

/* grain on the glass */
.bar__glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.3 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 4;
}

/* the sheen: a soft band of light across the top of the glass */
.bar__glass::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 30px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  opacity: 0.6;
  z-index: 4;
}

@media (hover: hover) {
  .bar:hover .bar__glass {
    box-shadow:
      inset 0 0 0 1px rgba(52, 40, 28, 0.11),
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 -1px 0 rgba(52, 40, 28, 0.04),
      0 1px 2px rgba(52, 40, 28, 0.07),
      0 8px 18px -6px rgba(52, 40, 28, 0.12),
      0 30px 56px -20px rgba(70, 48, 26, 0.24),
      0 56px 100px -40px rgba(70, 48, 26, 0.18);
  }
}

.bar__row {
  position: relative;
  z-index: 3;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 18px;
}

/* ------------------------------------------------------------------ the brand */
.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
  outline-offset: 4px;
}

.brand__mark {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.brand__stem {
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.brand__leaf {
  fill: var(--olive);
  transform-box: fill-box;
}

.brand__leaf:nth-of-type(2) {
  transform-origin: 100% 100%;
}

.brand__leaf:nth-of-type(3),
.brand__leaf:nth-of-type(4) {
  transform-origin: 0% 100%;
}

.brand__leaf:nth-of-type(3) {
  fill: var(--terra);
}

.brand__name {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 20px;
  font-weight: 560;
  font-variation-settings: 'opsz' 48, 'SOFT' 60;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ------------------------------------------------------------------ the middle: links, title, booked */
.bar__mid {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.links {
  list-style: none;
  display: flex;
  gap: 2px;
}

.links__a {
  position: relative;
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  color: #4a443d;
  font-size: 14px;
  font-weight: 500;
  font-variation-settings: 'wdth' 100;
  text-decoration: none;
  transition: color 0.25s ease, font-variation-settings 0.35s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.links__a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(52, 40, 28, 0.055);
  box-shadow: inset 0 0 0 1px rgba(52, 40, 28, 0.04);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
  z-index: -1;
}

@media (hover: hover) {
  .links__a:hover {
    color: var(--ink);
    font-variation-settings: 'wdth' 108;
  }

  .links__a:hover::before {
    opacity: 1;
    transform: scale(1);
  }
}

.links__a:active::before {
  opacity: 1;
  transform: scale(0.94);
}

.links__a:focus-visible,
.brand:focus-visible,
.book:focus-visible,
.reserve:focus-visible,
.seg__opt:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.bar__title,
.bar__booked {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}

.bar__title-main {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 15px;
  font-weight: 520;
  font-variation-settings: 'opsz' 24;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.bar__title-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.2;
}

.bar__booked {
  flex-direction: row;
  gap: 7px;
  color: var(--olive);
  font-size: 13px;
  font-weight: 560;
}

.bar__booked svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.bar__booked path {
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}

/* ------------------------------------------------------------------ Book a table */
.book {
  position: relative;
  flex: none;
  height: 40px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px 0 17px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  color: var(--cream);
  background: linear-gradient(180deg, var(--olive), var(--olive-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 1px 1px rgba(20, 26, 18, 0.25),
    0 6px 14px -6px rgba(20, 26, 18, 0.45);
  transition: box-shadow 0.3s ease;
}

.book__words {
  position: relative;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 560;
  font-variation-settings: 'wdth' 100;
  transition: font-variation-settings 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.book__icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  overflow: visible;
}

.book__plus,
.book__check {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: view-box;
  transform-origin: 50% 50%;
}

.book__check {
  stroke-dasharray: 1;
}

.book__shine,
.reserve__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 248, 236, 0.26) 48%, transparent 66%);
  transform: translateX(var(--shine, -120%));
}

@media (hover: hover) {
  .book:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 0 0 1px rgba(0, 0, 0, 0.25),
      0 1px 1px rgba(20, 26, 18, 0.25),
      0 10px 20px -8px rgba(20, 26, 18, 0.55);
  }

  .book:hover .book__words {
    font-variation-settings: 'wdth' 110;
  }
}

/* ------------------------------------------------------------------ the booking inside the bar */
.booking {
  position: relative;
  z-index: 2;
  display: none;
  grid-template-columns: 38% 1fr;
  gap: 14px;
  padding: 2px 10px 10px;
}

.bar.is-open .booking {
  display: grid;
}

.room {
  position: relative;
  min-height: 0;
}

.room__frame {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #d9cfc0;
  box-shadow:
    inset 0 0 0 1px rgba(52, 40, 28, 0.08),
    0 1px 2px rgba(52, 40, 28, 0.1),
    0 10px 22px -12px rgba(52, 40, 28, 0.35);
}

.room__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 240, 220, 0.1), transparent 30%, rgba(30, 20, 10, 0.42)),
    radial-gradient(70% 60% at 30% 20%, rgba(255, 214, 160, var(--glow, 0)), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.room__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 60%;
}

.room__tag {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px 8px;
  border-radius: 12px;
  color: #fffaf2;
  background: rgba(36, 28, 20, 0.36);
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.room__tag-name {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 13px;
  font-weight: 520;
  line-height: 1.15;
}

.room__tag-left {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
  color: #f3d6bf;
}

/* ------------------------------------------------------------------ the form: three sliding pills */
.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 6px;
}

.row__label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 520;
}

.seg {
  position: relative;
  display: flex;
  height: 34px;
  padding: 3px;
  border-radius: 999px;
  background: var(--track);
  box-shadow: inset 0 1px 2px rgba(52, 40, 28, 0.08), inset 0 0 0 1px rgba(52, 40, 28, 0.03), 0 1px 0 rgba(255, 255, 255, 0.9);
}

.seg__puck {
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #fbf8f3);
  box-shadow:
    inset 0 0 0 1px rgba(52, 40, 28, 0.07),
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(52, 40, 28, 0.12),
    0 4px 10px -4px rgba(52, 40, 28, 0.22);
  pointer-events: none;
}

.seg__opt {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 480;
  font-variation-settings: 'wdth' 96;
  white-space: nowrap;
  transition: color 0.25s ease, font-weight 0.3s ease, font-variation-settings 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.seg__opt[aria-pressed='true'] {
  color: var(--ink);
  font-weight: 620;
  font-variation-settings: 'wdth' 104;
}

.seg__opt:disabled {
  cursor: not-allowed;
  color: rgba(138, 130, 120, 0.5);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(138, 130, 120, 0.55);
}

@media (hover: hover) {
  .seg__opt:not(:disabled):not([aria-pressed='true']):hover {
    color: #4a443d;
  }
}

/* ------------------------------------------------------------------ Reserve */
.send {
  padding-top: 2px;
}

.reserve {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 16px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  color: var(--cream);
  text-align: left;
  background: linear-gradient(180deg, var(--olive), var(--olive-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 1px 1px rgba(20, 26, 18, 0.2),
    0 10px 20px -10px rgba(20, 26, 18, 0.55);
}

.reserve__words {
  flex: none;
  font-size: 14px;
  font-weight: 600;
}

.reserve__sum {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(245, 239, 228, 0.62);
  font-size: 12px;
  font-weight: 460;
  text-align: right;
}

.reserve__icon {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 248, 236, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 236, 0.1);
  overflow: visible;
}

.reserve__arrow,
.reserve__check,
.reserve__spin {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reserve__check {
  stroke-dasharray: 1;
}

.reserve__spin {
  stroke-dasharray: 0.28 1;
  opacity: 0;
  transform-box: view-box;
  transform-origin: 50% 50%;
}

/* ------------------------------------------------------------------ narrower bars */
@container (max-width: 500px) {
  .links {
    display: none;
  }

  .bar__booked {
    display: none;
  }

  .bar__row {
    padding-left: 15px;
  }

  .booking {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .room {
    height: clamp(64px, 16vh, 120px);
  }

  .room__tag {
    right: auto;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 5px 10px 6px;
    border-radius: 10px;
  }

  .bar__title {
    align-items: flex-start;
    padding-left: 12px;
  }
}

@container (max-width: 360px) {
  .brand__name {
    font-size: 18px;
  }

  .row {
    grid-template-columns: 44px 1fr;
  }

  .seg__opt {
    font-size: 12px;
  }
}
