/* Yin's Cafe — Timeless Cafe Sdn. Bhd.  Official brand colours: Fermented Red #A72024, Starter Cream #F5F1E5. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-red: #A72024;
  --color-red-dark: #8A1B1E;
  --color-cream: #F5F1E5;
  --color-cream-deep: #EBE6D4;
  --color-ink: #241616;
  --color-ink-soft: #5A4545;
  --color-rule: #D9CBB8;
  --color-on-red: #F5F1E5;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: 1.125rem;
  --leading: 1.65;
  --container: 70rem;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 2px;
  --focus: 0 0 0 2px var(--color-cream), 0 0 0 4px var(--color-red);
}

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

html,
body {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text);
  font-weight: 400;
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-red);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-red-dark);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 100;
  transform: translateY(-120%);
  padding: 0.5rem 0.85rem;
  background: var(--color-red);
  color: var(--color-on-red);
  text-decoration: none;
  font-size: 0.95rem;
}

.skip:focus {
  transform: translateY(0.6rem);
}

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

/* Header */

.legal-bar {
  background: var(--color-cream-deep);
  border-bottom: 1px solid var(--color-rule);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-ink);
  padding: 0.55rem 0;
  text-align: center;
}

.legal-bar strong {
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  color: var(--color-red);
  text-decoration: none;
  flex: 0 0 auto;
}

.wordmark:hover {
  color: var(--color-red);
}

.wordmark img {
  width: 7.25rem;
  height: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 1.15rem;
}

.nav a {
  color: var(--color-ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.45rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

/* Hero */

.hero {
  padding: clamp(3rem, 9vh, 6rem) 0 clamp(3.25rem, 8vh, 5.5rem);
  text-align: center;
}

.hero-logo {
  color: var(--color-red);
  width: min(22rem, 82%);
  margin: 0 auto;
}

.hero-place {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-red);
}

.hero-tagline {
  margin: 1.5rem auto 0;
  max-width: 22rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  color: var(--color-ink);
}

.hero-actions {
  margin-top: 1.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.hero-legal {
  margin: 2rem auto 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--color-red);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-on-red);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  color: var(--color-on-red);
}

.btn-ghost {
  background: transparent;
  color: var(--color-red);
}

.btn-ghost:hover {
  background: var(--color-red);
  color: var(--color-on-red);
}

/* Sections */

.section {
  padding: var(--section) 0;
}

.section + .section {
  border-top: 1px solid var(--color-rule);
}

.section-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--color-red);
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--color-ink);
}

.lede,
.prose p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.prose p:last-child {
  margin-bottom: 0;
}

.band {
  background: var(--color-cream-deep);
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
}

@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Promise list */

.promise {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1.5rem;
  max-width: 28rem;
  border-bottom: 1px solid var(--color-rule);
}

.promise li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--color-rule);
  font-size: 1.05rem;
}


/* Hours / contact */

.dl {
  margin: 0;
}

.dl div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--color-rule);
}

.dl dt {
  font-size: 0.9rem;
  color: var(--color-ink-soft);
}

.dl dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.25;
}

.address {
  font-style: normal;
  max-width: 22rem;
}

.address p {
  margin: 0 0 0.35rem;
}

.address .place {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 0.7rem;
}

.map-link {
  display: inline-flex;
  margin-top: 1.1rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 28rem;
}

.contact-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--color-rule);
}

.contact-list .label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  margin-bottom: 0.15rem;
}

.contact-list a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Document pages */

.doc {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--section);
}

.doc h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.15rem, 5vw, 3rem);
  line-height: 1.15;
}

.doc .updated {
  margin: 0 0 2rem;
  color: var(--color-ink-soft);
  font-size: 0.95rem;
}

.doc h2 {
  margin: 2.15rem 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.25;
}

.doc .prose {
  max-width: var(--measure);
}

.doc .prose ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.doc .prose li {
  margin-bottom: 0.4rem;
}

/* Footer */

.site-footer {
  background: var(--color-red);
  color: var(--color-on-red);
  padding: 2.5rem 0 2.25rem;
}

.site-footer a {
  color: var(--color-on-red);
}

.site-footer a:hover {
  color: var(--color-on-red);
}

.site-footer a:focus-visible {
  box-shadow: 0 0 0 2px var(--color-red), 0 0 0 4px var(--color-on-red);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.85rem;
  margin: 0 0 1rem;
  color: var(--color-on-red);
}

.footer-legal {
  margin: 0 0 1.15rem;
  max-width: 58rem;
  font-size: 0.95rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.footer-meta {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 58rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #c98986;
  border-top: 1px solid color-mix(in srgb, var(--color-on-red) 28%, transparent);
}

.footer-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

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

/* 404 */

.not-found {
  padding: clamp(4rem, 12vh, 7rem) 0;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
}

.not-found p {
  margin: 0 auto 1.5rem;
  max-width: 24rem;
}

@media (max-width: 640px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.7rem;
    padding-bottom: 0.45rem;
    min-height: 0;
    gap: 0.15rem;
  }

  .wordmark img {
    width: 6.25rem;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
    gap: 0.1rem 1rem;
  }

  .promise {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  a {
    transition: none;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .site-footer {
    background: transparent;
    color: var(--color-ink);
    border-top: 2px solid var(--color-red);
  }

  .site-footer a,
  .footer-brand {
    color: var(--color-ink);
  }

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

.footer-logo {
  width: 8.5rem;
  margin-bottom: 1.15rem;
}

#about,
#hours,
#visit,
#contact,
.doc {
  scroll-margin-top: 5.25rem;
}
