/* Delimanjoo Australia – site v2. No external requests. Motion is CSS;
   site.js adds the .js class (looping motion), the pause button and video playback. */

:root {
  --orange: #F7931E;     /* from the AU logo png */
  --orange-lt: #FFAA45;
  --custard: #FFD45E;
  --ink: #3B2314;        /* deep brown */
  --bean: #7A1E2E;       /* red bean */
  --choc: #4A2A1A;
  --blush: #F6E3D9;      /* the kiosk counter */
  --gold: #C9A46A;       /* the ring around the kiosk sign */
  --crust: #E38A1E;
  --muted: #6E4A33;
  --orange-dk: #A3560A;  /* stars on white cards */
  --white: #FFFFFF;
  --focus: var(--ink);

  --display: "Avenir Next Condensed", "Roboto Condensed", "sans-serif-condensed",
             "Bahnschrift SemiCondensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Avenir Next", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ko: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;

  --pad: clamp(1.25rem, 5vw, 3rem);
  --band: clamp(4rem, 11vw, 7rem);
  --max: 72rem;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }

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

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

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.25rem, 8vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--band) var(--pad);
}

.skip {
  --focus: var(--white);
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.button--ink { background: var(--ink); color: var(--white); }
.button--line { border-color: var(--ink); color: var(--ink); }
.button--ink:hover { background: #55331E; }
.button--line:hover { background: rgba(59, 35, 20, 0.08); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--orange);
  color: var(--ink);
  padding: 0 var(--pad) var(--band);
}

.hero__deco {
  position: absolute;
  color: var(--orange-lt);
  pointer-events: none;
}
.hero__deco--one { width: 34rem; height: 18rem; right: -10rem; top: -4rem; rotate: -18deg; }
.hero__deco--two { width: 22rem; height: 12rem; left: -8rem; bottom: 2rem; rotate: 24deg; }

.nav {
  position: relative;
  z-index: 1;
  max-width: calc(var(--max) - 2 * var(--pad));
  margin: 0 auto;
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a { display: inline-block; padding: 0.6rem 0; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.motion-toggle {
  font: inherit;
  font-size: 0.875rem;
  min-height: 2.75rem;
  padding: 0.3rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.motion-toggle[hidden] { display: none; }

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: calc(var(--max) - 2 * var(--pad));
  margin: clamp(1.5rem, 6vw, 3.5rem) auto 0;
  display: grid;
  gap: clamp(3rem, 8vw, 4rem);
}

.hero__text { min-width: 0; }

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 15vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
.wordmark__letters { white-space: nowrap; }
.wordmark__letters span { display: inline-block; }

.hero__ko {
  font-family: var(--ko);
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  margin-top: 0.75rem;
}

.hero__lede {
  font-size: clamp(1.3rem, 4.8vw, 1.75rem);
  line-height: 1.3;
  max-width: 22em;
  margin-top: 1.25rem;
  font-weight: 600;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Photo collage: three tilted prints */
.collage {
  position: relative;
  width: min(100%, 32rem);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.collage figure {
  position: absolute;
  border: 6px solid var(--white);
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1.25rem 2.5rem rgba(59, 35, 20, 0.3);
}
.collage img { width: 100%; }
.collage__a { width: 64%; left: 0; top: 10%; rotate: -6deg; z-index: 1; }
.collage__b { width: 44%; right: 0; top: 0; rotate: 5deg; z-index: 2; }
.collage__c { width: 56%; left: 22%; bottom: 0; rotate: -2deg; z-index: 3; }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--custard);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  padding: 0.85rem 0;
}
.ticker__track { display: flex; width: max-content; }
.ticker__group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-right: 1.25rem;
  white-space: nowrap;
}
.ticker svg { width: 2.4em; height: 1.3em; color: var(--orange); flex: none; }

/* ---------- Flavours ---------- */
.flavours__intro { max-width: 36rem; font-size: 1.15rem; }

.flavours__list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.25rem;
}
.flavour {
  border-radius: 2rem;
  padding: 1.75rem 1.75rem 2rem;
}
.flavour h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  margin: 1rem 0 0.35rem;
}
.flavour__cake { width: 9rem; height: 5rem; display: block; color: var(--crust); }
.flavour--custard { background: var(--custard); color: var(--ink); }
.flavour--custard .flavour__cake { color: #C9650F; }
.flavour--bean { background: var(--bean); color: var(--white); --focus: var(--white); }
.flavour--bean .flavour__cake { color: #F2A23A; }
.flavour--choc { background: var(--choc); color: var(--white); --focus: var(--white); }
.flavour--choc .flavour__cake { color: #F2A23A; }

/* ---------- Baking video ---------- */
.bake { background: var(--ink); color: var(--white); --focus: var(--custard); }
.bake__inner { display: grid; gap: 3rem; align-items: center; }
.bake__media { width: min(100%, 26rem); margin: 0 auto; padding: 14px; }
.bake__video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--ink), 0 0 0 14px var(--gold);
  background: #2A180D;
}
.bake__text p { max-width: 32rem; }
.bake__text p + p { margin-top: 1rem; }
.bake h2 { color: var(--custard); }

/* ---------- Instagram ---------- */
.insta__intro { max-width: 36rem; }
.insta__grid {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.insta__grid a { display: block; border-radius: 1rem; overflow: hidden; }
.insta__grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- Reviews ---------- */
.reviews { background: var(--custard); }
.reviews__lead { max-width: 40rem; }
.reviews__lead a { font-weight: 700; }
.reviews__list:focus-visible { outline-offset: -3px; }

.reviews__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 1.5rem 0 2rem;
}
.score { display: grid; gap: 0.1rem; }
.score__value {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.25rem;
  line-height: 1;
}
.reviews__list {
  list-style: none;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0 calc(-1 * var(--pad));
  padding-inline: var(--pad);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(85%, 22rem);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
}
.review {
  scroll-snap-align: start;
  background: var(--white);
  border-radius: 1.5rem;
  padding: 1.5rem;
}
.review figure { display: flex; flex-direction: column; gap: 0.75rem; height: 100%; }
.review blockquote { font-size: 1.05rem; }
.review blockquote [lang="ko"] { font-family: var(--ko); }
.review__translation { font-size: 0.95rem; color: var(--muted); }
.review figcaption { margin-top: auto; font-size: 0.95rem; font-weight: 600; }

/* Stars: partial fill for the averages */
.stars { letter-spacing: 0.12em; font-size: 1.1rem; line-height: 1.2; color: var(--orange-dk); }
.stars--44 {
  background: linear-gradient(90deg, var(--ink) var(--fill), rgba(59, 35, 20, 0.22) var(--fill));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stars--44 { --fill: 88%; }

.reviews__note { margin-top: 1.5rem; font-size: 0.95rem; max-width: 40rem; }

/* ---------- Visit ---------- */
.visit { background: var(--blush); }
.visit__inner { display: grid; gap: 3rem; align-items: center; }
.visit__photo { width: min(100%, 22rem); margin: 0 auto; padding: 12px; }
.visit__photo img {
  width: 100%;
  aspect-ratio: 700 / 782;
  object-fit: cover;
  border-radius: 999px;
  box-shadow: 0 0 0 9px var(--blush), 0 0 0 12px var(--gold);
}
.visit__address { font-style: normal; font-size: 1.15rem; line-height: 1.55; margin-bottom: 1rem; }
.visit__links { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.visit__links a { display: inline-block; padding: 0.45rem 0; font-weight: 700; }

/* ---------- Partner band (small) ---------- */
.partner { background: var(--white); border-top: 1px solid rgba(59, 35, 20, 0.15); }
.partner__inner { padding-top: 3rem; padding-bottom: 3rem; }
.partner__title { font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 0.5rem; }
.partner__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-top: 0.75rem; }
.partner__links a { display: inline-block; padding: 0.45rem 0; font-weight: 700; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--blush); --focus: var(--blush); font-size: 0.95rem; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}
.footer__mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--orange);
  letter-spacing: -0.02em;
}
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer__links a { display: inline-block; padding: 0.45rem 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 48rem) {
  .flavours__list { grid-template-columns: repeat(3, 1fr); }
  .insta__grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

@media (min-width: 56rem) {
  .hero__inner { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .wordmark { font-size: clamp(2rem, 8.5vw, 6.5rem); }
  .bake__inner { grid-template-columns: 1fr 1fr; }
  .visit__inner { grid-template-columns: 2fr 3fr; }
  .reviews__list {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* 1. Wordmark letters drop in once on load */
  .wordmark__letters span { animation: drop 0.8s var(--bounce) both; }
  .wordmark__letters span:nth-child(2) { animation-delay: 0.05s; }
  .wordmark__letters span:nth-child(3) { animation-delay: 0.1s; }
  .wordmark__letters span:nth-child(4) { animation-delay: 0.15s; }
  .wordmark__letters span:nth-child(5) { animation-delay: 0.2s; }
  .wordmark__letters span:nth-child(6) { animation-delay: 0.25s; }
  .wordmark__letters span:nth-child(7) { animation-delay: 0.3s; }
  .wordmark__letters span:nth-child(8) { animation-delay: 0.35s; }
  .wordmark__letters span:nth-child(9) { animation-delay: 0.4s; }
  .wordmark__letters span:nth-child(10) { animation-delay: 0.45s; }

  /* 2. Collage prints settle in once; with JS (pause button available) they also bob */
  .collage figure { animation: settle 0.9s var(--bounce) both; }
  .collage .collage__b { animation-delay: 0.15s; }
  .collage .collage__c { animation-delay: 0.3s; }
  .js .collage figure { animation: settle 0.9s var(--bounce) both, bob 6s ease-in-out 1s infinite; }
  .js .collage .collage__b { animation-delay: 0.15s, 2s; }
  .js .collage .collage__c { animation-delay: 0.3s, 3s; }

  /* 3. Ticker loops only when the pause button exists (JS) */
  .js .ticker__track { animation: ticker 60s linear infinite; }

  /* 4. Hovers */
  .button { transition: transform 0.2s var(--bounce), background-color 0.2s; }
  .button:hover { transform: translateY(-2px) scale(1.03); }
  .flavour { transition: transform 0.3s var(--bounce); }
  .flavour:hover { transform: translateY(-6px) rotate(-1deg); }
  .flavour:hover .flavour__cake { animation: wiggle 0.6s ease-in-out; }
  .insta__grid img { transition: transform 0.4s ease; }
  .insta__grid a:hover img, .insta__grid a:focus-visible img { transform: scale(1.06); }

  /* Pause button (site.js) stops the looping motion */
  .is-paused .collage figure { animation-play-state: running, paused; }
  .is-paused .ticker__track { animation-play-state: paused; }
}

/* 5. Sections rise into view, on screens that support scroll-driven animation */
@media screen and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 60%) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-0.5em) scale(0.85); }
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: translateY(2rem) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes wiggle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -8deg; }
  75% { rotate: 8deg; }
}
/* translate, not transform, so hover transforms still work after the reveal */
@keyframes rise {
  from { opacity: 0; translate: 0 2.5rem; }
  to { opacity: 1; translate: 0 0; }
}
