/* Dawn Patrol Café (sample): a beachside café that opens before sunrise.
   Navy pre-dawn sky, a striped retro sun, sea-foam and sand. Shrikhand is the
   surf-shop sign lettering; Figtree does everything else. */

:root {
  --ink: #16213a;
  --ink-2: #22304f;
  --sun: #ff7a3d;
  --sun-deep: #e8591c;
  --gold: #ffc94d;
  --foam: #bfe3dc;
  --mist: #f2f7f5;
  --text: #16213a;
  --muted: #56617a;
  --line: #d3e2de;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--text);
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  text-wrap: balance;
}

h1,
h2,
.logo {
  font-family: "Shrikhand", "Figtree", serif;
  font-weight: 400;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.8em 1.4em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1.2 "Figtree", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sun {
  background: var(--sun);
  color: var(--ink);
}

.btn-sun:hover {
  background: var(--gold);
}

.btn-line {
  border-color: var(--foam);
  color: var(--foam);
}

.btn-line:hover {
  background: var(--foam);
  color: var(--ink);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Header */

.site-header {
  background: var(--ink);
  color: #fff;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sun);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}

.logo svg {
  width: 40px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--ink-2);
}

.nav .nav-order {
  background: var(--sun);
  color: var(--ink);
}

.nav .nav-order:hover,
.nav .nav-order[aria-current="page"] {
  background: var(--gold);
}

/* Hero: the sun comes up over the water */

.hero {
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 32px;
  padding-block: clamp(40px, 7vw, 88px) 0;
}

.hero h1 {
  color: var(--gold);
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  line-height: 1;
}

.hero .lede {
  max-width: 34ch;
  margin-top: 20px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #dfe7f0;
}

.hero-text {
  padding-bottom: clamp(40px, 7vw, 88px);
}

.sunrise {
  align-self: end;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  overflow: visible;
}

.sunrise .sun {
  animation: rise 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise {
  from { transform: translateY(70px); }
  to { transform: none; }
}

/* Opening hours ribbon */

.hours-band {
  background: var(--gold);
  color: var(--ink);
}

.hours-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 36px;
  padding-block: 16px;
  font-weight: 700;
  text-align: center;
}

.hours-band strong {
  font-family: "Shrikhand", serif;
  font-weight: 400;
  font-size: 1.25rem;
}

/* Sections */

.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section-head p {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--muted);
}

/* Menu board: item, dotted leader, price */

.board {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.board li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 10px;
}

.board .item {
  font-weight: 700;
  font-size: 1.15rem;
}

.board .dots {
  border-bottom: 2px dotted var(--muted);
  opacity: 0.45;
  transform: translateY(-5px);
}

.board .price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.board .desc {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.98rem;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 0.45em;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  color: #2c7a6c;
  vertical-align: 0.15em;
}

.regulars {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.regulars .link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  color: var(--sun-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* Four photos of the regulars, under the heading */
.plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.plates img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

/* Sandy feet welcome */

.welcome-photo {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  object-position: center 45%;
  border-radius: 20px;
}

.welcome {
  background: #fff;
  border-block: 1px solid var(--line);
}

.welcome-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.welcome-text p {
  margin-top: 16px;
  font-size: 1.15rem;
}

.perks {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perks li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.1rem;
}

.perks svg {
  width: 48px;
  height: 48px;
}

/* Order ahead band */

.order-band {
  background: var(--sun);
  color: var(--ink);
}

.order-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: clamp(36px, 6vw, 56px);
}

.order-band h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
}

.order-band p {
  margin-top: 6px;
  font-weight: 600;
}

/* Find us */

.find {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.find address {
  margin-top: 20px;
  font-style: normal;
  font-size: 1.15rem;
  font-weight: 600;
}

.find .phone {
  margin-top: 8px;
  font-weight: 700;
}

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

.hours {
  width: 100%;
  max-width: 360px;
  margin-top: 20px;
  border-collapse: collapse;
}

.hours th,
.hours td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

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

.map {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px -18px rgba(22, 33, 58, 0.45);
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: #dfe7f0;
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
}

.site-footer .logo {
  font-size: 1.3rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Menu page */

.page-hero {
  background: var(--ink);
  color: #fff;
}

.page-hero .wrap {
  padding-block: clamp(40px, 7vw, 72px);
}

.page-hero h1 {
  color: var(--gold);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
}

.page-hero p {
  max-width: 50ch;
  margin-top: 14px;
  color: #dfe7f0;
}

.page-hero .legend {
  font-size: 0.95rem;
}

.page-hero .legend .tag {
  margin: 0 4px 0 12px;
  color: var(--foam);
}

.page-hero .legend .tag:first-child {
  margin-left: 0;
}

.jump {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}

.jump ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.jump a {
  display: block;
  padding: 0.4em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.jump a:hover {
  background: var(--ink);
  color: #fff;
}

.menu-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 72px) clamp(32px, 6vw, 88px);
}

.menu-group {
  scroll-margin-top: 80px;
}

.menu-group h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--sun-deep);
}

.menu-group .board {
  margin-top: 20px;
}

.menu-group .note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.sizes {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sizes th,
.sizes td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.sizes th:first-child,
.sizes td:first-child {
  text-align: left;
}

.sizes td,
.sizes thead th + th {
  padding-left: 18px;
}

.sizes thead th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.sizes tbody th {
  font-weight: 700;
}

/* Order page */

.order-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.order-group + .order-group {
  margin-top: 36px;
}

.order-group h2 {
  font-size: 1.9rem;
  color: var(--sun-deep);
}

.order-group .note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.order-items {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.order-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.order-items .name {
  font-weight: 700;
}

.order-items .price {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stepper button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: 700 1.3rem/1 "Figtree", sans-serif;
  cursor: pointer;
}

.stepper button:hover {
  background: var(--ink);
  color: #fff;
}

.stepper button:disabled {
  opacity: 0.3;
  cursor: default;
}

.stepper button:disabled:hover {
  background: #fff;
  color: var(--ink);
}

.stepper output {
  min-width: 2ch;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.summary {
  position: sticky;
  top: 24px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px -18px rgba(22, 33, 58, 0.45);
  scroll-margin-top: 16px;
}

.summary h2 {
  font-size: 1.9rem;
}

.summary-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-variant-numeric: tabular-nums;
}

.summary-empty {
  margin-top: 12px;
  color: var(--muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  font-weight: 800;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.checkout {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.checkout label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 0.95rem;
}

.checkout input,
.checkout select,
.checkout textarea {
  width: 100%;
  padding: 0.7em 0.8em;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.checkout input:focus,
.checkout select:focus,
.checkout textarea:focus {
  outline: none;
  border-color: var(--sun);
}

.checkout textarea {
  min-height: 80px;
  resize: vertical;
}

.checkout .btn {
  width: 100%;
  margin-top: 4px;
}

.checkout .small {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.order-error {
  color: #b3261e;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Phones: a bar at the bottom shows the order so far */
.order-bar {
  display: none;
}

/* Smaller screens */

@media (max-width: 820px) {
  .hero-inner,
  .regulars,
  .welcome-inner,
  .find,
  .menu-groups,
  .order-layout {
    grid-template-columns: 1fr;
  }

  /* Phones: the sunrise comes first, so it's on the first screen */
  .hero-inner {
    gap: 28px;
    padding-top: 20px;
  }

  .sunrise {
    order: -1;
    max-width: 340px;
  }

  .hero-text {
    padding-bottom: 48px;
  }

  .hero .lede {
    margin-top: 14px;
  }

  .regulars {
    gap: 8px;
  }

  .welcome-photo {
    aspect-ratio: 16 / 10;
  }

  .summary {
    position: static;
  }

  .order-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px var(--gutter);
    background: var(--ink);
    color: #fff;
    font-weight: 700;
  }

  .order-bar[hidden] {
    display: none;
  }

  .order-bar .btn {
    padding: 0.6em 1.1em;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.35rem;
  }

  .logo svg {
    width: 34px;
  }

  .nav a {
    padding: 0.4em 0.65em;
    font-size: 0.95rem;
  }

  .actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sunrise .sun {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }
}
