/* Daylog landing. Colours are the app's own palette (src/palette.ts). */
:root {
  --bg: #171b18;
  --bg-2: #1f2621;
  --surface: #262d27;
  --ink: #f0f3ed;
  --muted: #afb9ac;
  --lime: #9dca76;
  --deep: #426c2a;
  --paper: #fafbf8;
  --paper-2: #edf0e8;
  --paper-ink: #202821;
  --paper-muted: #566056;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --head: clamp(2.5rem, 1.4rem + 4.6vw, 6rem);
  --mega: clamp(4rem, 1rem + 11vw, 13rem);
  --margin: clamp(16px, 2.4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: var(--body); line-height: 1.5; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p, li, h1, h2, h3 { word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--paper-ink); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--paper); color: var(--paper-ink); padding: 8px 12px; }

/* Mixed type: sans in ink, serif in lime. */
.mix { font-family: var(--sans); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; }
.mix em { font-family: var(--serif); font-style: normal; font-weight: 600; letter-spacing: -0.03em; color: var(--lime); }
.on-paper .mix em { color: var(--deep); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 8px; font: inherit; font-size: var(--body); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 180ms var(--ease), background-color 180ms ease; }
.btn:active { transform: scale(0.97); }
.btn-lime { background: var(--lime); color: var(--paper-ink); }
.btn-lime:hover { background: #b2d891; }
.btn-dark { background: var(--paper-ink); color: var(--paper); }
.btn-dark:hover { background: #374237; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; z-index: 50; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--margin); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.mark { display: grid; padding: 7px 10px 8px; border-radius: 8px; background: var(--bg); color: var(--ink); text-decoration: none; line-height: 0.92; }
.mark b { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.mark span { font-family: var(--sans); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions .btn { min-height: 40px; padding: 0 16px; font-size: var(--small); }
.lang { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; background: var(--paper); color: var(--paper-ink); font-size: var(--small); font-weight: 700; text-decoration: none; }
.lang:hover { background: var(--paper-2); }

/* ---------- Hero: a photo turns into the app ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: var(--bg); display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 104px var(--margin) 56px; }
.hero-title { position: relative; z-index: 4; }
.hero-title h1 { font-size: var(--head); }
.hero-title p { margin-top: 24px; max-width: 24em; font-size: var(--lead); line-height: 1.4; }
.hero-title .btn { margin-top: 32px; }
.marquee { position: absolute; z-index: 1; left: 0; right: 0; top: 50%; translate: 0 -50%; display: grid; gap: 0.04em; pointer-events: none; user-select: none; }
.marquee div { display: flex; width: max-content; white-space: nowrap; font-size: var(--mega); line-height: 1; }
.marquee span { padding-right: 0.35em; }
:root:not(.fx) .marquee { display: none; }
.marquee .row-a { font-family: var(--serif); font-weight: 600; color: var(--lime); letter-spacing: -0.03em; }
.marquee .row-b { font-family: var(--sans); font-weight: 800; color: var(--surface); letter-spacing: -0.045em; }
.phone-stage { position: relative; z-index: 2; display: grid; place-items: center; perspective: 1800px; }
.check { position: absolute; z-index: 3; width: min(80vw, 600px); left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; overflow: visible; }
.check path { fill: none; stroke: var(--lime); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.sticker { position: absolute; z-index: 5; left: calc(50% + min(15svh, 140px)); bottom: 16%; background: var(--paper); color: var(--paper-ink); padding: 12px 16px; border-radius: 10px; font-size: var(--small); line-height: 1.35; rotate: 4deg; }
.sticker b { display: block; font-size: var(--body); font-weight: 800; }

/* The phone: a CSS object with real thickness (edge layers are added by the script). */
.phone { --h: min(72svh, 680px); position: relative; height: var(--h); aspect-ratio: 0.49; transform-style: preserve-3d; }
.phone .body { position: absolute; inset: 0; border-radius: calc(var(--h) * 0.085); background: #0d100e; padding: calc(var(--h) * 0.016); transform: translateZ(0.5px); }
.phone .edge { position: absolute; inset: 0; border-radius: calc(var(--h) * 0.085); background: #3a433b; }
.phone .edge:first-child { background: #0d100e; }
.phone .screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--h) * 0.07); background: var(--paper); }
.phone .screen > img, .phone .screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .island { position: absolute; z-index: 2; top: calc(var(--h) * 0.028); left: 50%; translate: -50% 0; width: 30%; height: calc(var(--h) * 0.036); border-radius: 99px; background: #0d100e; }
.phone .shot-photo { opacity: 0; }

/* ---------- Statement ---------- */
.statement { padding: clamp(120px, 16vw, 240px) var(--margin); text-align: center; background: var(--bg); }
.statement p { max-width: 14em; margin: 0 auto; font-size: clamp(2.25rem, 1rem + 4.4vw, 5.5rem); }
.statement small { display: block; max-width: 30em; margin: 40px auto 0; font-size: var(--lead); font-weight: 500; letter-spacing: -0.01em; line-height: 1.4; color: var(--muted); }

/* ---------- Collage ---------- */
.collage { position: relative; background: var(--paper); color: var(--paper-ink); min-height: 200svh; overflow: clip; }
.collage-text { position: sticky; top: 32svh; z-index: 2; max-width: 36em; margin: 0 auto; padding: 28px var(--margin); text-align: center; background: var(--paper); border-radius: 8px; }
.collage-text h2 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem); }
.collage-text p { margin-top: 24px; font-size: var(--lead); line-height: 1.4; }
.shots { position: absolute; inset: 0; }
.shot { position: absolute; margin: 0; width: var(--w, 17vw); }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.shot figcaption { margin-top: 8px; font-size: var(--small); color: var(--paper-muted); }
.shot figcaption b { color: var(--paper-ink); font-weight: 700; }
.collage-note { position: absolute; z-index: 2; left: var(--margin); bottom: 24px; font-size: var(--small); color: var(--paper-ink); background: var(--paper); padding: 4px 10px; border-radius: 4px; }

/* ---------- Two screens ---------- */
.duo { position: relative; overflow: hidden; background: var(--paper-2); color: var(--paper-ink); min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 120px 0; }
.duo-item { position: relative; z-index: 2; padding: 0 clamp(16px, 6vw, 96px); }
.duo-item:nth-child(2) { padding-left: 26vw; }
.duo-item:nth-child(3) { padding-right: 26vw; }
.duo-item:nth-child(2) { text-align: right; }
.duo h2 { font-size: var(--mega); }
.duo p { margin-top: 20px; font-size: var(--body); max-width: 20em; }
.duo-item:nth-child(2) p { margin-left: auto; }
/* English words are longer than the two-syllable Korean titles */
@media (min-width: 1001px) {
  :lang(en) .duo h2 { font-size: clamp(2.5rem, 4.4vw, 4.2rem); }
  :lang(en) .duo-item:nth-child(2) { padding-left: 18vw; }
  :lang(en) .duo-item:nth-child(3) { padding-right: 18vw; }
}
.peek { position: absolute; z-index: 1; top: 50%; perspective: 1400px; }
.peek .phone { --h: min(52svh, 500px); }
.peek-l { left: 3vw; translate: 0 -50%; }
.peek-r { right: 3vw; translate: 0 -50%; }

/* ---------- Mochi hall ---------- */
.mochi { background: var(--bg); padding: clamp(120px, 14vw, 220px) var(--margin); }
.mochi-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px 64px; align-items: end; }
.mochi-head h2 { font-size: var(--head); }
.mochi-head > p { font-size: var(--body); max-width: 30em; }
.calc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; margin-top: 16px; }
.calc label { display: grid; gap: 6px; font-size: var(--small); color: var(--muted); }
.calc input { width: 9ch; font: inherit; font-size: var(--lead); font-weight: 800; color: var(--ink); background: var(--surface); border: 0; border-radius: 8px; padding: 10px 14px; }
.calc output { word-break: keep-all; flex: 1 1 18em; font-size: var(--lead); font-weight: 700; line-height: 1.35; padding-bottom: 8px; }
.calc output b { color: var(--lime); }
.hall { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; perspective: 1200px; }
.card { position: relative; background: var(--bg-2); padding: 20px 20px 18px; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); transition: transform 300ms var(--ease), background-color 200ms ease; transform-style: preserve-3d; }
.card img { width: 78%; margin: 0 auto; aspect-ratio: 3 / 4; object-fit: contain; transition: transform 400ms var(--ease); }
.card p { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: var(--small); color: var(--muted); }
.card p b { color: var(--ink); font-weight: 700; }
.card p span:last-child { color: var(--lime); }
.card.is-current { background: var(--deep); }
.card.is-current p, .card.is-current p span:last-child { color: var(--ink); }
.mochi-note { margin-top: 24px; font-size: var(--small); color: var(--muted); }

/* ---------- Get it ---------- */
.get { background: var(--paper); color: var(--paper-ink); display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; padding: clamp(120px, 12vw, 200px) var(--margin); overflow: hidden; }
.get h2 { font-size: var(--head); }
.get p { margin-top: 24px; max-width: 26em; font-size: var(--lead); line-height: 1.4; }
.get .row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.get .row span { font-size: var(--body); color: var(--paper-muted); }
.get .phone-stage { min-height: 72svh; }
.get .phone { --h: min(66svh, 620px); }

/* ---------- FAQ ---------- */
.faq { background: var(--surface); padding: clamp(120px, 12vw, 200px) var(--margin); display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.faq h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); }
.faq-text { columns: 2; column-gap: 48px; }
.faq-text p { break-inside: avoid; margin-bottom: 22px; font-size: var(--body); line-height: 1.55; }
.faq-text p b { color: var(--lime); font-weight: 700; }
.faq-text a { text-underline-offset: 3px; }

/* ---------- Footer: a dark card on lime ---------- */
.footer { background: var(--lime); padding: 12px; }
.foot-card { position: relative; background: var(--bg); border-radius: clamp(20px, 3vw, 40px); padding: clamp(96px, 10vw, 150px) var(--margin) 28px; overflow: hidden; display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: end; gap: 24px; }
.foot-card h2 { grid-column: 1 / -1; text-align: center; font-size: var(--mega); position: relative; z-index: 2; }
.foot-mochi { grid-column: 2; grid-row: 2; justify-self: center; width: min(100%, 400px); position: relative; z-index: 1; margin-top: -3vw; }
.foot-col { grid-row: 2; display: grid; gap: 10px; align-self: center; text-align: center; font-size: var(--lead); font-weight: 800; letter-spacing: -0.02em; }
.foot-col.left { grid-column: 1; }
.foot-col.right { grid-column: 3; }
.foot-col small { font-size: var(--small); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 4px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { color: var(--lime); }
.foot-col .soon { font-size: var(--small); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.foot-last { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; font-size: var(--small); color: var(--muted); position: relative; z-index: 2; }
.foot-last a { color: var(--ink); }
.credits summary { cursor: pointer; color: var(--ink); }
.credits ul { margin-top: 10px; display: grid; gap: 4px; max-width: 70em; }
.foot-check { position: absolute; z-index: 3; left: 50%; top: clamp(48px, 6vw, 96px); width: min(64vw, 560px); translate: -50% 0; pointer-events: none; overflow: visible; }
.foot-check path { fill: none; stroke: var(--lime); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marquee .row-a { animation: slide 40s linear infinite; }
  .marquee .row-b { animation: slide 52s linear infinite reverse; }
  @keyframes slide { to { transform: translateX(-50%); } }
  .card:hover img { transform: translateZ(40px) scale(1.06); }
  .js .rise { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .rise.is-in { opacity: 1; transform: none; }
  .js .hall .rise { transform: rotateX(-55deg) translateY(60px); transform-origin: 50% 100%; transition-duration: 900ms; }
  .js .hall .rise.is-in { transform: none; }

  /* With the script, the hero is one pinned screen where the photo becomes the phone. */
  .fx .hero { display: block; height: 100svh; min-height: 0; padding: 0; }
  .fx .hero-title { position: absolute; left: var(--margin); bottom: 7svh; max-width: min(48rem, 92vw); }
  .fx .hero .phone-stage { position: absolute; inset: 0; }
  /* Dark ground under the hero title while it sits on the full-bleed photo; GSAP fades --scrim with the title. */
  .fx .hero::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: var(--scrim, 1); background: linear-gradient(to top, rgb(23 27 24 / 0.88) 0%, rgb(23 27 24 / 0.55) 32%, rgb(23 27 24 / 0) 62%); } /* taste-skill-ignore: neutral scrim over the hero photo */
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 48px; }
  .duo { grid-template-columns: 1fr; gap: 72px; }
  .duo-item, .duo-item:nth-child(2) { text-align: left; }
  .duo-item:nth-child(2) p { margin-left: 0; }
  .duo-item:nth-child(2), .duo-item:nth-child(3) { padding-inline: var(--margin); }
  .peek { opacity: 0.3; }
  .mochi-head { grid-template-columns: 1fr; }
  .hall { grid-template-columns: repeat(2, 1fr); }
  .get { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .foot-card { grid-template-columns: 1fr 1fr; }
  .foot-mochi { grid-column: 1 / -1; grid-row: 2; width: min(80%, 340px); }
  .foot-col.left { grid-column: 1; grid-row: 3; }
  .foot-col.right { grid-column: 2; grid-row: 3; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .mark b, .mark span { font-size: 19px; }
  .top-actions .btn { padding: 0 12px; }
  .phone { --h: min(60svh, 540px); }
  .fx .hero-title { bottom: 5svh; }
  .sticker { left: auto; right: 4%; bottom: 9%; }
  .collage { min-height: 230svh; }
  .collage-text { top: 30svh; background: var(--paper); padding: 20px 16px; margin: 0 12px; }
  .shot { width: var(--wm, 30vw); }
  .peek { display: none; }
  .duo h2 { font-size: clamp(4rem, 22vw, 6rem); }
  :lang(en) .duo h2 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .hall { gap: 8px; }
  .card { padding: 14px 12px 12px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
  .card p { flex-direction: column; gap: 0; }
  .faq-text { columns: 1; }
  .foot-col { font-size: var(--body); }
}
.shot { left: var(--x); top: var(--y); }
@media (max-width: 640px) { .shot { left: var(--xm); top: var(--ym); } }
