/* Landing page: a laid table seen from above. Inherits tokens, fonts and grain from menu.css. */
html:has(body.is-landing), html:has(body.is-verify), html:has(body.is-privacy) { scroll-snap-type: none; }

.land-top {
  position: relative; z-index: 2;
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 64rem; margin: 0 auto; padding: max(env(safe-area-inset-top), 18px) var(--gutter) 0;
}
.wordmark { font-size: calc(34px * var(--script-scale)); color: var(--ink); text-decoration: none; padding: 0 .1em .1em; }
.top-link { margin: 0; }
.top-links { display: flex; align-items: baseline; gap: clamp(14px, 4vw, 28px); }
.top-links .aside-link, .lang-link { margin: 0; }
.privacy .lang-link { margin-top: 1rem; }

.landing { max-width: 64rem; margin: 0 auto; padding: 0 var(--gutter); }
.landing section { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* ---------- First viewport ---------- */
.table-hero { padding-top: clamp(28px, 6vh, 64px); }
.lead { font-size: calc(clamp(56px, 17vw, 112px) * var(--script-scale)); line-height: 1.02; padding: 0 .12em .1em; text-wrap: balance; max-width: 9ch; }
.lede { margin-top: 1rem; font-style: italic; font-size: clamp(19px, 5vw, 23px); line-height: 1.4; max-width: 28ch; text-wrap: balance; }

.setting {
  --plate: min(calc(100vw - 2 * var(--gutter) - 2 * clamp(16px, 4.6vw, 28px) - 2 * clamp(6px, 3vw, 28px)), 420px);
  position: relative; display: grid; grid-template-columns: auto var(--plate) auto; align-items: center; gap: clamp(6px, 3vw, 28px);
  margin: clamp(28px, 5vh, 48px) 0 0;
}
.plate-wrap { position: relative; width: var(--plate); aspect-ratio: 1; display: grid; place-items: center; }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plate .rim { fill: none; stroke: var(--hair); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plate .rim.inner { stroke: color-mix(in srgb, var(--hair) 55%, transparent); }
.cutlery { width: clamp(16px, 4.6vw, 28px); height: calc(var(--plate) * .92); overflow: visible; }
.cutlery path { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* The phone on the plate runs the real demo menu. */
.phone {
  --w: calc(var(--plate) * .42);
  position: relative; display: block; width: var(--w); aspect-ratio: 390 / 844;
  border: 1px solid var(--ink); border-radius: calc(var(--w) * .14); overflow: hidden;
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(60, 50, 40, .08), 0 18px 30px -18px rgba(60, 50, 40, .45);
}
.phone iframe {
  position: absolute; top: 0; left: 0; width: 390px; height: 844px; border: 0;
  transform-origin: 0 0; transform: scale(calc(var(--scale, .4)));
  pointer-events: none; /* the page scrolls over it; tapping opens the demo */
}
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; width: min(100%, 24rem); margin-top: 1.4rem; }
.examples-title { grid-column: 1 / -1; text-align: center; font-style: italic; font-size: 19px; color: var(--soft); }
.example-btn {
  display: grid; place-items: center; min-height: 48px; padding: .5rem .8rem; border: 1px solid var(--ink); border-radius: 99px;
  color: var(--ink); text-decoration: none; text-align: center; font-size: 18px; line-height: 1.2; font-weight: 600; transition: color .2s, background .2s;
}
.example-btn:hover { background: var(--ink); color: var(--paper); }

/* The place card: sign-up and sign-in in one field. */
.card-slot { width: 100%; display: flex; justify-content: center; margin-top: clamp(28px, 5vh, 44px); scroll-margin-top: 24px; }
.place-card {
  width: min(100%, 24rem); display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 1.6rem 1.4rem 1.2rem; border: 1px solid color-mix(in srgb, var(--hair) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 70%, #fff);
}
.place-card .line-input { font-size: 21px; }
.place-card .as-button { margin-top: .9rem; color: var(--ink); }
.place-card.sent .line-input, .place-card.sent .as-button { display: none; }
.place-card .quiz-msg { min-height: 0; margin-top: .4rem; }
.place-card .quiz-msg:empty { display: none; }
.fine { margin: 1rem auto 0; max-width: 32ch; font-style: italic; font-size: 16px; color: var(--soft); }

/* Wide screens: the words and the place card on the left, the laid table on the right,
   so signing up never sits below the fold. */
@media (min-width: 960px) {
  .landing, .land-top { max-width: 72rem; }
  .landing .table-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto 1fr;
    column-gap: clamp(40px, 6vw, 96px); align-items: start; text-align: left;
    padding-top: clamp(32px, 9vh, 104px);
  }
  .landing .table-hero .lead { grid-area: 1 / 1; justify-self: start; max-width: 11ch; padding-left: 0; font-size: calc(clamp(76px, 7.4vw, 108px) * var(--script-scale)); }
  .landing .table-hero .lede { grid-area: 2 / 1; justify-self: start; margin-top: 1.2rem; }
  .landing .table-hero .card-slot { grid-area: 3 / 1; justify-content: flex-start; margin-top: 2.2rem; }
  .landing .table-hero .fine { grid-area: 4 / 1; margin: 1rem 0 0; }
  .landing .table-hero .setting { grid-area: 1 / 2 / 4 / 3; margin: 0; --plate: min(26vw, 360px); align-self: center; }
  .landing .table-hero .examples { grid-area: 4 / 2 / 6 / 3; justify-self: center; margin-top: .4rem; }
}

/* ---------- Sections on the tablecloth ---------- */
.landing > section + section { margin-top: clamp(84px, 14vh, 140px); }
.section-title { font-size: calc(clamp(48px, 13vw, 76px) * var(--script-scale)); padding: 0 .12em .1em; }
.section-copy { margin-top: 1.4rem; font-style: italic; font-size: 20px; line-height: 1.45; max-width: 32ch; text-wrap: balance; }
.cap-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; }

.papers-lang { margin-top: .6rem; font-size: 18px; color: var(--soft); }

/* ---------- Kvällens program: a hairline timeline, one thing from the app laid beside each item ---------- */
.programme { list-style: none; margin: 2.4rem 0 0; padding: 0; width: 100%; max-width: 60rem; display: flex; flex-direction: column; }
.act { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; padding: 2.6rem 0 3rem; position: relative; }
.act + .act { border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent); }
.act-text { display: flex; flex-direction: column; align-items: center; gap: .3rem; max-width: 30rem; }
.act-text .t-time { text-transform: uppercase; font-size: 12px; }
.act-text .t-title { margin: 0; }
.act-copy { margin-top: .5rem; font-style: italic; font-size: 19px; line-height: 1.45; max-width: 34ch; text-wrap: balance; }
.act-object { width: 100%; display: flex; justify-content: center; }

/* Paper lying on the cloth: the app's own surfaces at small size */
.paper {
  position: relative; background: color-mix(in srgb, var(--paper) 55%, #fff);
  border: 1px solid color-mix(in srgb, var(--hair) 60%, transparent);
  box-shadow: 0 1px 1px rgba(60, 50, 40, .06), 0 16px 26px -20px rgba(60, 50, 40, .45);
  rotate: var(--tilt, 0deg);
}
.paper .label { font-size: 10px; gap: 8px; letter-spacing: .32em; }
.paper .hair { width: 22px; }
.obj-word { font-size: calc(34px * var(--script-scale)); padding: 0 .1em .06em; }
.obj-fine { margin-top: .9rem; font-style: italic; font-size: 14px; color: var(--soft); }

/* Inbjudan */
.obj-rsvp { --tilt: -1.5deg; width: min(100%, 19rem); padding: 1.4rem 1.3rem 1.2rem; display: flex; flex-direction: column; align-items: center; }
.obj-picks { display: flex; gap: 1.4rem; margin: .5rem 0 .9rem; font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.obj-picks .is-on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.obj-person { width: 100%; display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: baseline; gap: .5rem; padding: .55rem 0; border-top: 1px solid color-mix(in srgb, var(--hair) 40%, transparent); text-align: left; }
.obj-person .cap { font-size: 10px; letter-spacing: .2em; }
.obj-name { font-size: 19px; }
.obj-chip { font-style: italic; font-size: 13px; padding: .2rem .55rem; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--hair) 70%, transparent); color: var(--soft); }
.obj-chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Dukningen: three printed pieces, overlapping a little */
.obj-prints { position: relative; width: min(100%, 22rem); height: 18.5rem; }
.obj-a5 { --tilt: -3deg; position: absolute; left: 0; top: 0; width: 9.6rem; min-height: 13.6rem; padding: 1rem .8rem 1.3rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.obj-a5 .obj-word { font-size: calc(28px * var(--script-scale)); margin-bottom: .3rem; }
.obj-a5 .label { margin-top: .5rem; font-size: 8px; }
.obj-a5 .hair { width: 12px; }
.obj-dish { font-size: 11px; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase; text-wrap: balance; }
.obj-table-card { --tilt: 2deg; position: absolute; right: 0; top: .6rem; width: 9rem; padding: 1rem .9rem .9rem; display: flex; flex-direction: column; align-items: center; }
.obj-table-card .obj-word { font-size: calc(26px * var(--script-scale)); }
.obj-qr { width: 5.6rem; height: 5.6rem; margin-top: .5rem; }
.obj-qr svg { display: block; width: 100%; height: 100%; }
.obj-table-card .obj-fine { margin-top: .6rem; font-size: 11.5px; text-align: center; line-height: 1.3; }
.obj-tent { --tilt: -1deg; position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: 11rem; padding: 1.1rem .8rem .9rem; display: flex; flex-direction: column; align-items: center; }
.obj-tent::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px dashed color-mix(in srgb, var(--hair) 55%, transparent); }
.obj-tent-name { font-size: calc(34px * var(--script-scale)); padding: 0 .1em .06em; }
.obj-tent .orn { width: 96px; height: 14px; margin: .3rem auto 0; }

/* Till bords */
.obj-pace { --tilt: 1deg; width: min(100%, 19rem); padding: 1.3rem 1.2rem 1rem; display: flex; flex-direction: column; align-items: center; }
.obj-now {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem .45rem .95rem; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--hair) 70%, transparent); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; font-weight: 600;
}
.obj-now i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.obj-courses { list-style: none; margin: 1rem 0 0; padding: 0; width: 100%; }
.obj-courses li { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .65rem 0; color: var(--soft); }
.obj-courses li + li { border-top: 1px solid color-mix(in srgb, var(--hair) 40%, transparent); }
.obj-courses .cap { font-size: 10px; }
.obj-courses li > span:nth-child(2) { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.obj-courses .is-now { color: var(--ink); }
.obj-courses .is-now .cap { color: var(--ink); }
.obj-mark { margin-top: .25rem; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; display: inline-flex; align-items: center; gap: .45rem; }
.obj-mark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--hair); }

/* Efter maten: the turned quiz card and the leaderboard beside it */
.obj-quiz { position: relative; width: min(100%, 22rem); display: flex; flex-direction: column; align-items: center; }
.turned { --tilt: -2deg; width: 17rem; min-height: 12.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.4rem; }
.turned .label { font-size: 11px; }
.turned .q-prompt { margin: 0; font-size: 21px; }
.line-sample { width: 70%; height: 1px; background: var(--hair); }
.obj-board { --tilt: 2.5deg; list-style: none; margin: -1.6rem 0 0 6rem; padding: .7rem 1rem; width: 15rem; }
.obj-board li > span:nth-child(2) { white-space: nowrap; }
.obj-board li { display: grid; grid-template-columns: 1.8rem 1fr auto; align-items: baseline; padding: .35rem 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.obj-board li + li { border-top: 1px solid color-mix(in srgb, var(--hair) 40%, transparent); color: var(--soft); }
.obj-board .cap { font-size: 10px; }
.obj-pts { font-style: italic; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--soft); }

/* Skål */
.obj-toast { --tilt: -1deg; width: min(100%, 18rem); padding: 1.4rem 1.4rem 1.3rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.obj-greeting { font-style: italic; font-size: 18px; line-height: 1.4; text-wrap: balance; }
.obj-toast .cap { font-size: 10px; }

/* ---------- För värden: a short list set like a menu card ---------- */
.host-notes { list-style: none; margin: 2rem 0 0; padding: 0; width: 100%; max-width: 32rem; }
.host-notes li { padding: 1.3rem 0; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.host-notes li + li { border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent); }
.host-notes .cap-title { font-size: 13px; text-wrap: balance; }
.host-notes p { font-style: italic; font-size: 19px; line-height: 1.4; max-width: 32ch; text-wrap: balance; }

.papers { margin: 2rem auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 5vw, 40px) clamp(12px, 4vw, 40px); max-width: 40rem; }
.paper-plate { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.paper-plate .cap { font-size: 11px; letter-spacing: .16em; padding-left: .16em; white-space: nowrap; }
@media (min-width: 560px) { .paper-plate .cap { font-size: 12px; letter-spacing: .28em; padding-left: .28em; } }
/* Each plate takes its paper's roles from .swatch-<theme> in themes.css */
.mini {
  width: 100%; max-width: 168px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--hair);
  box-shadow: inset 0 0 0 7px var(--paper), inset 0 0 0 8px color-mix(in srgb, var(--line) 70%, transparent);
}
.mini .script { transform: translateX(var(--script-nudge)); font-size: calc(clamp(21px, 6.4vw, 37px) * var(--script-scale)); padding: 0 .1em .1em calc(.1em + max(var(--script-track), 0em)); }

.closing-section .place-card { margin-top: 1.6rem; }
.land-foot {
  max-width: 64rem; margin: clamp(84px, 14vh, 140px) auto 0; padding: 1.4rem var(--gutter) calc(env(safe-area-inset-bottom) + 28px);
  display: flex; align-items: baseline; justify-content: center; gap: 1.6rem; flex-wrap: wrap; border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent);
}
.land-foot .script { font-size: calc(28px * var(--script-scale)); }
.land-foot .aside-link { margin: 0; }
.land-by { flex-basis: 100%; text-align: center; font-size: 16px; color: var(--soft); }
.land-by a, .privacy :is(p, li) a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.land-by a { display: inline-block; padding: .6rem 0; }
.land-by a:hover, .privacy :is(p, li) a:hover { color: var(--ink); }

/* ---------- Verify + privacy ---------- */
.verify { min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); }
.verify .as-button { color: var(--ink); }
.privacy { max-width: 34rem; margin: 0 auto; padding: max(env(safe-area-inset-top), 56px) var(--gutter) 72px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.privacy section { width: 100%; margin-top: 2.4rem; text-align: left; }
.privacy :is(p, ul) { margin-top: .7rem; font-size: 19px; line-height: 1.5; }
.privacy ul { padding-left: 1.2em; }
.privacy .privacy-lead { max-width: 30ch; font-size: 22px; font-style: var(--italic); }
.privacy .privacy-updated { margin-top: 2.6rem; font-size: 16px; color: var(--soft); }
.privacy .aside-link { margin-top: 2.4rem; }

/* ---------- Laying the table (once, on arrival) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .plate .rim { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-rim 1.6s var(--ease-peel) .15s forwards; }
  .js .plate .rim.inner { animation-delay: .45s; }
  .js .fork { animation: set-left 1s var(--ease-out) .9s both; }
  .js .knife { animation: set-right 1s var(--ease-out) 1s both; }
  .js .phone { animation: settle 1.1s var(--ease-out) 1.25s both; }
  .js .lead { animation: write 1.6s var(--ease-peel) .1s both; }
  .js .lede, .js .examples { animation: rise 1s var(--ease-out) .7s both; }
  .js .card-slot { animation: rise 1s var(--ease-out) 1.7s both; }
}
@keyframes draw-rim { to { stroke-dashoffset: 0; } }
/* The programme's things are set down on the cloth as they come into view (landing.js adds .is-laid). */
@media (prefers-reduced-motion: no-preference) {
  .js .act-object[data-lay] > * { transition: opacity .9s var(--ease-out), translate 1.1s var(--ease-out), rotate 1.3s var(--ease-out); }
  .js .act-object[data-lay]:not(.is-laid) > * { opacity: 0; translate: 0 -14px; rotate: calc(var(--tilt, 0deg) + 3deg); }
  .js .act-object[data-lay]:not(.is-laid) .obj-tent { translate: -50% -14px; }
  .js .act-object[data-lay] > * > .paper { transition: opacity .9s var(--ease-out) .18s, translate 1.1s var(--ease-out) .18s, rotate 1.3s var(--ease-out) .18s; }
  .js .act-object[data-lay]:not(.is-laid) > * > .paper:nth-child(n+2) { opacity: 0; translate: 0 -10px; }
}
@keyframes set-left { from { opacity: 0; transform: translateX(-14px); } }
@keyframes set-right { from { opacity: 0; transform: translateX(14px); } }
@keyframes settle { from { opacity: 0; transform: translateY(-18px) scale(.97); box-shadow: 0 30px 50px -20px rgba(60, 50, 40, .3); } }

@media (min-width: 760px) {
  .setting { --plate: min(44vw, 460px); }
}
/* Desktop: the landing is the whole tablecloth, not a card on a table. */
@media (min-width: 760px) {
  html:has(body.is-landing), html:has(body.is-privacy), html:has(body.is-verify) { background: var(--paper); }
  body.is-landing::before, body.is-landing::after, body.is-privacy::before, body.is-privacy::after, body.is-verify::before, body.is-verify::after {
    left: 0; right: 0; width: auto; transform: none; top: 0; bottom: 0; box-shadow: none; outline: none;
  }
}

/* Wide screens: the programme alternates sides along a centre hairline. */
@media (min-width: 860px) {
  .programme { position: relative; }
  .programme::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--hair) 45%, transparent); }
  .act { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0; padding: 3.4rem 0; }
  .act + .act { border-top: 0; }
  .act::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--paper); border: 1px solid var(--hair); }
  .act-text { align-items: flex-end; text-align: right; padding-right: clamp(36px, 5vw, 72px); max-width: none; }
  .act-object { padding-left: clamp(36px, 5vw, 72px); justify-content: flex-start; }
  .act:nth-child(even) .act-text { order: 2; align-items: flex-start; text-align: left; padding: 0 0 0 clamp(36px, 5vw, 72px); }
  .act:nth-child(even) .act-object { order: 1; padding: 0 clamp(36px, 5vw, 72px) 0 0; justify-content: flex-end; }
  .act-copy { text-wrap: pretty; }
  .host-notes { display: grid; grid-template-columns: 1fr 1fr; max-width: 46rem; column-gap: 3rem; }
  .host-notes li + li { border-top: 0; }
  .host-notes li:nth-child(n+3) { border-top: 1px solid color-mix(in srgb, var(--hair) 45%, transparent); }
}
