/* ==========================================================================
   Nasi Singapura: built from the Figma file "Nasi Singapura Website Redesign"
   Desktop frames are 1440px wide, mobile frames 390px. Below 900px the
   mobile layouts are used; sizes in between scale fluidly.
   ========================================================================== */

:root {
  /* Colour */
  --yellow: #fad806;
  --yellow-hover: #ebca00;
  --ink: #111111;
  --ink-hover: #2c2c2c;
  --muted: #5c5a55;
  --line: #e4e0d6;
  --cream: #fbf7ec;
  --todo: #b4570f;
  --white: #ffffff;

  /* Type */
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid sizes: mobile value at 390px, desktop value at 1440px */
  --fs-display: clamp(44px, calc(30.63px + 3.429vw), 80px);
  --fs-h2: clamp(32px, calc(26.06px + 1.524vw), 48px);
  --fs-lead: clamp(16px, calc(14.51px + 0.381vw), 20px);
  --fs-closing: clamp(18px, calc(15.77px + 0.571vw), 24px);

  /* Layout */
  --gutter: clamp(20px, calc(5.714vw - 2.29px), 80px);
  --content: 1280px;
  --radius: 4px;
  --radius-control: 6px;
}

/* Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 500;
  border-radius: var(--radius-control);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Each stack sets its own --gap so nested stacks don't inherit the parent's */
.stack {
  --gap: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
}

.stack > * {
  max-width: 100%;
}

.measure {
  max-width: 820px;
}

/* Typography
   ========================================================================== */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--ink {
  color: var(--ink);
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-display);
  line-height: 1;
  letter-spacing: -0.02em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
}

.h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

.closing-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-closing);
  line-height: 1.25;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.small {
  font-size: 14px;
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

/* Content still waiting on the client, styled as in the Figma file */
.todo {
  color: var(--todo);
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-control);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn--primary:hover {
  background: var(--yellow-hover);
}

.btn--dark {
  background: var(--ink);
  color: var(--yellow);
  border: 1.5px solid var(--ink);
}

.btn--dark:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--yellow);
}

/* Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.site-header__logo img {
  width: 154px;
  height: 44px;
}

.site-nav ul {
  display: flex;
  gap: 40px;
}

.site-nav a {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--yellow);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration-line: underline;
}

.nav-toggle {
  display: none;
}

/* Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0 40px;
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px clamp(40px, 5.56vw, 80px);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer__brand img {
  width: 182px;
  height: 52px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}

.site-footer p,
.site-footer li {
  font-size: 14px;
  line-height: 1.5;
}

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

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

.site-footer :focus-visible {
  outline-color: var(--yellow);
}

.site-footer .todo {
  color: var(--yellow);
}

.site-footer__copy {
  margin-top: 48px;
  color: var(--muted);
}

/* Shared sections
   ========================================================================== */

/* Vertical padding per breakpoint: --pt/--pb on desktop, --pt-m/--pb-m on mobile */
.section {
  padding-top: var(--pt, 96px);
  padding-bottom: var(--pb, 96px);
}

.section--flush-top {
  --pt: 0px;
  --pt-m: 0px;
}

.section--flush-bottom {
  --pb: 0px;
  --pb-m: 0px;
}

.section--tight-top {
  --pt-m: 40px;
}

.section--cream {
  background: var(--cream);
}

.section--yellow {
  background: var(--yellow);
}

.page-header {
  background: var(--yellow);
  padding: 96px 0 64px;
}

.page-header .stack {
  --gap: 16px;
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Map: the Figma placeholder sits underneath the live Google Map embed */
.map {
  position: relative;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius);
}

.map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.map__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Dish cards */
.dish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 32px;
  width: 100%;
}

.dish {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dish img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Info groups (Visit and Contact) */
.info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info a {
  text-decoration: none;
}

.info a:hover {
  text-decoration: underline;
}

/* Home
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(480px, 44.45vw, 720px);
  background: var(--yellow);
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  /* Keeps the copy on the same left edge as the rest of the page */
  padding: 64px clamp(32px, 4.44vw, 64px) 64px max(var(--gutter), calc(100% - 640px));
}

.hero__lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--font-display);
}

.hero__wordmark {
  font-weight: 900;
  font-size: min(62px, 4.3vw);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__tagline {
  font-weight: 800;
  font-size: min(26px, 1.806vw);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__photo {
  position: relative;
}

.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured > .stack {
  --gap: 40px;
}

.featured .section-heading {
  --gap: 12px;
}

.visit-teaser__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5.56vw, 80px);
  align-items: center;
}

.visit-teaser__details {
  --gap: 28px;
}

.visit-teaser__details .section-heading {
  --gap: 12px;
}

.visit-teaser__hours {
  --gap: 6px;
}

.visit-teaser .map {
  aspect-ratio: 600 / 420;
}

/* About
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 640fr) minmax(0, 560fr);
  gap: clamp(40px, 5.56vw, 80px);
  align-items: center;
}

.split--photo-first {
  grid-template-columns: minmax(0, 560fr) minmax(0, 640fr);
}

.split__photo img {
  aspect-ratio: 560 / 460;
}

.about-closing .stack {
  --gap: 24px;
}

/* Legacy
   ========================================================================== */

.legacy-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 720fr) minmax(0, 480fr);
  gap: clamp(40px, 5.56vw, 80px);
  align-items: center;
}

.legacy-intro__photo img,
.legacy-lives__photo img {
  aspect-ratio: 4 / 5;
}

.legacy-lives__grid {
  display: grid;
  grid-template-columns: minmax(0, 480fr) minmax(0, 720fr);
  gap: clamp(40px, 5.56vw, 80px);
  align-items: center;
}

.legacy-dream > .stack {
  --gap: 64px;
}

.infaq {
  display: grid;
  grid-template-columns: minmax(0, 580fr) minmax(0, 636fr);
  gap: clamp(32px, 4.44vw, 64px);
  align-items: start;
  width: 100%;
}

/* min-height: 0 keeps the box at its aspect ratio instead of growing to the photos' natural height */
.infaq__photos {
  display: grid;
  grid-template-columns: minmax(0, 420fr) minmax(0, 200fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  aspect-ratio: 636 / 420;
  min-height: 0;
}

.paynow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.paynow img {
  width: 160px;
  height: 148px;
  object-fit: contain;
}

.paynow__details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.paynow__number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  white-space: nowrap;
}

.legacy-closing .stack {
  --gap: 24px;
}

/* Menu
   ========================================================================== */

.page-header--menu {
  padding-bottom: 56px;
}

.menu-section {
  padding: 80px 0 32px;
}

.menu-section--lunch {
  padding-bottom: 96px;
}

.menu-section > .stack {
  --gap: 32px;
}

.menu-section__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

/* Visit
   ========================================================================== */

.page-header--plain {
  background: none;
  padding-bottom: 48px;
}

.visit-details__grid {
  display: grid;
  grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);
  gap: clamp(40px, 5.56vw, 80px);
  align-items: start;
}

.visit-details__info {
  --gap: 40px;
}

.visit-details .map {
  aspect-ratio: 760 / 640;
}

/* Contact
   ========================================================================== */

.contact {
  padding: 96px 0 120px;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 544fr) minmax(0, 640fr);
  gap: clamp(40px, 6.67vw, 96px);
  align-items: start;
}

.contact__details {
  --gap: 32px;
}

.contact__details .section-heading {
  --gap: 16px;
}

.contact__details .info {
  gap: 4px;
}

.contact-form {
  --gap: 24px;
  padding: 48px;
  background: var(--cream);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field label {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  font-size: 16px;
  line-height: 1.55;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  height: 160px;
  resize: vertical;
}

.field ::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(250, 216, 6, 0.6);
}

.form-status:empty {
  display: none;
}

/* Mobile layouts (Figma mobile frames, 390px)
   ========================================================================== */

@media (max-width: 899px) {
  .display {
    line-height: 1.04;
    letter-spacing: -0.01em;
  }

  /* Long page titles drop to heading size on mobile */
  .display--long {
    font-weight: 800;
    font-size: var(--fs-h2);
    line-height: 1.15;
    letter-spacing: -0.005em;
  }

  .h2 {
    line-height: 1.15;
    letter-spacing: -0.005em;
  }

  .lead {
    line-height: 1.55;
  }

  .closing-line {
    line-height: 1.3;
  }

  .stack {
    --gap: 14px;
  }

  /* Header */
  .site-header__inner {
    padding-block: 14px;
  }

  .site-header__logo img {
    width: 119px;
    height: 34px;
  }

  .nav-toggle {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    margin: -8px -8px -8px 0;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .nav-toggle span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2.2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-toggle span:nth-child(1) { top: 14.9px; }
  .nav-toggle span:nth-child(2) { top: 20.9px; }
  .nav-toggle span:nth-child(3) { top: 26.9px; }

  .site-header[data-open] .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header[data-open] .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header[data-open] .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .js .site-header[data-open] .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 12px;
  }

  .site-nav li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    display: block;
    padding: 14px 0;
    font-size: 18px;
  }

  /* Without JavaScript the links simply sit below the logo */
  .no-js .nav-toggle {
    display: none;
  }

  .no-js .site-header__inner {
    flex-wrap: wrap;
  }

  .no-js .site-nav {
    width: 100%;
  }

  /* Footer */
  .site-footer {
    padding: 40px 0 32px;
  }

  .site-footer__cols {
    flex-direction: column;
    gap: 28px;
  }

  .site-footer__brand img {
    width: 140px;
    height: 40px;
  }

  .site-footer__brand p,
  .site-footer__copy-extra {
    display: none;
  }

  .site-footer__copy {
    margin-top: 28px;
  }

  /* Shared */
  .section {
    padding-top: var(--pt-m, 48px);
    padding-bottom: var(--pb-m, 48px);
  }

  .page-header {
    padding: 40px 0 32px;
  }

  .page-header .stack {
    --gap: 12px;
  }

  .dish-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .info {
    gap: 6px;
  }

  /* Home */
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero__photo {
    order: -1;
    height: min(77vw, 460px);
  }

  .hero__text {
    gap: 18px;
    padding: 32px var(--gutter) 36px;
  }

  /* 36px / 15px at 390px wide; scales down so 320 to 375px phones don't overflow */
  .hero__wordmark {
    font-size: clamp(28px, 9.2vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.01em;
  }

  .hero__tagline {
    font-size: clamp(12px, 3.83vw, 26px);
  }

  .hero__actions {
    gap: 12px;
  }

  .featured > .stack {
    --gap: 24px;
  }

  .featured .section-heading,
  .visit-teaser__details .section-heading {
    --gap: 8px;
  }

  .visit-teaser__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .visit-teaser__details {
    display: contents;
  }

  .visit-teaser__hours {
    --gap: 4px;
  }

  .visit-teaser .map {
    order: 1;
    aspect-ratio: 350 / 220;
  }

  .visit-teaser .btn {
    order: 2;
    align-self: flex-start;
  }

  /* About */
  .split,
  .split--photo-first {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .split__photo {
    order: -1;
  }

  .split__photo img {
    aspect-ratio: 350 / 280;
  }

  .about-closing .stack {
    --gap: 16px;
  }

  /* Legacy */
  .legacy-intro__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .legacy-intro__text {
    display: contents;
  }

  .legacy-intro__photo {
    order: 1;
  }

  .legacy-intro__body {
    order: 2;
  }

  .legacy-lives__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .legacy-lives__photo img {
    aspect-ratio: 350 / 430;
  }

  .legacy-dream > .stack {
    --gap: 32px;
  }

  .infaq {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .infaq__text {
    display: contents;
  }

  .infaq__copy {
    order: 1;
  }

  .infaq__photos {
    order: 2;
    width: 100%;
    grid-template-columns: minmax(0, 230fr) minmax(0, 110fr);
    gap: 10px;
    aspect-ratio: 350 / 260;
  }

  .paynow {
    order: 3;
    gap: 16px;
  }

  .paynow img {
    width: 130px;
    height: 120px;
  }

  .legacy-closing .stack {
    --gap: 16px;
  }

  /* Menu */
  .page-header--menu {
    padding-bottom: 32px;
  }

  .menu-section {
    padding: 40px 0 8px;
  }

  .menu-section--lunch {
    padding-bottom: 48px;
  }

  .menu-section > .stack {
    --gap: 20px;
  }

  .menu-section__heading {
    gap: 4px 12px;
  }

  .menu-section__time {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Visit */
  .page-header--plain {
    padding-bottom: 28px;
  }

  .visit-details__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  .visit-details__info {
    display: contents;
  }

  .visit-details .map {
    order: 1;
    aspect-ratio: 350 / 260;
  }

  .visit-details .btn {
    order: 2;
    align-self: flex-start;
  }

  .visit-details .info {
    order: 3;
  }

  /* Contact */
  .contact {
    padding: 0;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-inline: 0;
  }

  .contact__details {
    --gap: 20px;
    padding: 40px var(--gutter) 36px;
  }

  .contact__details .section-heading {
    --gap: 20px;
  }

  .contact__details .info {
    gap: 2px;
  }

  .contact-form {
    --gap: 18px;
    padding: 32px var(--gutter) 40px;
  }

  .field {
    gap: 6px;
  }

  .field input,
  .field textarea {
    padding: 12px 14px;
  }

  .field textarea {
    height: 130px;
  }

  .contact-form .btn {
    align-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
