/* Andreas Teodor — site styles */

:root {
  --black: #080707;
  --fg: #f2f0ea;
  --muted: rgba(242, 240, 234, 0.62);
  --hairline: rgba(242, 240, 234, 0.16);
  --paper: #e0ded4;
  --gutter: clamp(16px, 2.4vw, 32px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bronze: #4e443c;
  --bronze-soft: rgba(78, 68, 60, 0.62);
  --print: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: Menlo, "SF Mono", ui-monospace, monospace;
  color-scheme: dark;
}

@view-transition { navigation: auto; }

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--fg);
  font: 400 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.at-mark { color: var(--paper); }
.at-mark svg { width: 100%; height: auto; }

/* ---------- Header ---------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--black);
  transition: opacity 0.8s ease 0.5s;
}

.home .site-top {
  position: fixed;
  inset: 0 0 auto 0;
  background: none;
}

/* Out-now ticker, after dekialem.com: Menlo, scrolling */
.ticker {
  display: block;
  width: 100%;
  height: 56px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-track span {
  font: 14px/56px var(--mono);
  letter-spacing: -0.4px;
  color: #fff;
  white-space: pre;
}

@keyframes ticker { to { transform: translateX(-50%); } }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
}

.site-header .at-mark { width: 64px; }

.site-nav {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
}

.site-nav a,
.site-nav button,
.text-link {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 0;
  transition: color 0.2s, opacity 0.2s;
}

/* Hover dot, after antonwesterlin.dk: a bullet appears left of the label */
.site-nav a::before,
.site-nav button::before,
.text-link::before {
  content: "•";
  position: absolute;
  right: calc(100% + 6px);
  opacity: 0;
  transition: opacity 0.2s;
}

.site-nav a:hover::before,
.site-nav button:hover::before,
.site-nav a[aria-current="page"]::before,
.text-link:hover::before,
.text-link:focus-visible::before { opacity: 1; }

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--black);
}

/* The film fills the whole first screen */
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--black);
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Darker at the top and bottom so the ticker and nav stay readable */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.55)),
    rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.hero-center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

/* Logo and links share one cell, so each sits dead centre on its own */
.hero-center > * { grid-area: 1 / 1; }

/* The logo gate (davidwilliambaum.com): the logo sits over the film,
   and on click it simply fades out while the site fades in */
.hero-logo {
  width: clamp(200px, 30vw, 380px);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.hero-links {
  display: grid;
  justify-items: center;
  gap: 4px;
}

/* Anton Westerlin's SHOP link: Inter 14px, 0.5px tracking, uppercase, white */
.hero-links .text-link {
  font-size: 14px;
  letter-spacing: 0.5px;
  line-height: 22.4px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.is-closed body { overflow: hidden; }
.is-closed .site-top,
.is-closed .hero-links,
.is-closed .site-footer { opacity: 0; pointer-events: none; }
.is-closed .hero-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  cursor: pointer;
  transition: none;
  animation: logo-in 1.4s ease 0.2s both;
}

@keyframes logo-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-links,
.site-footer { transition: opacity 0.8s ease 0.5s; }

/* ---------- Page loader: black, the AT in white, then the page ---------- */

.loader { display: none; }

.js.is-loading .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--paper);
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
  /* Failsafe: the page shows after 6 s even if the script never runs */
  animation: loader-out 0.8s ease 6s forwards;
}

/* Same size and place as the logo on the home page, so it hands over without a jump */
.loader svg {
  width: clamp(200px, 30vw, 380px);
  height: auto;
  animation: logo-in 0.6s ease both;
}

.is-loading body { overflow: hidden; }
.is-loaded .loader { opacity: 0; visibility: hidden; }
.had-loader .hero-logo { animation: none; }

@keyframes loader-out {
  to { opacity: 0; visibility: hidden; }
}

/* ---------- Footer (after antonwesterlin.dk: the copyright, one link, nothing else) ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 20px clamp(16px, 2.8vw, 40px) 48px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer p { margin: 0; }
.site-footer .policy:hover { color: #fff; }

.form-note {
  min-height: 1.4em;
  font-size: 12px;
  margin: 6px 0 0;
}

/* ---------- Shop (after antonwesterlin.dk/products) ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 936fr) minmax(0, 480fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
  color: #fff;
}

.product-gallery {
  display: grid;
  gap: 4px;
}

/* Front of the sleeve, then the back further down */
.product-gallery figure { margin: 0; aspect-ratio: 1; }
.product-gallery img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }

.product-info {
  position: sticky;
  top: 140px;
  align-self: start;
  padding: 22px 24px 0;
}

.product-info h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 35.2px;
  text-transform: uppercase;
}

.product-price { margin: 16px 0 0; font-size: 14px; line-height: 22.4px; }

.product-info hr {
  margin: 31px 0 28px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.69);
}

/* Vinyl waitlist: an email field in the style of Anton's quantity box, then the white button */
.waitlist { display: flex; gap: 11px; }

.waitlist input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.69);
  border-radius: 14px;
  background: #333;
  color: rgba(255, 255, 255, 0.93);
  font: 14px var(--font);
}
.waitlist input::placeholder { color: rgba(255, 255, 255, 0.5); }
.waitlist input:focus { outline: none; border-color: #fff; }
.waitlist .buy { flex: none; padding: 0 24px; }

.waitlist-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, 0.6); }

.buy {
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: #000;
  font-size: 14px;
  transition: background 0.2s;
}
.buy:hover { background: #e6e6e6; }

.tracklist { font-size: 14px; line-height: 22.4px; text-transform: uppercase; }
.tracklist h2,
.tracklist h3 { margin: 0; font-size: 14px; font-weight: 700; }
.tracklist h2 { margin-bottom: 18px; }
.tracklist ol { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: none; }

/* ---------- Privacy page ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) 112px;
  width: 100%;
}

.legal h1 { margin: 0 0 16px; font-size: 28px; font-weight: 500; line-height: 1.1; }
.legal h2 { margin: 32px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.legal p { margin: 0 0 12px; color: rgba(242, 240, 234, 0.8); max-width: 60ch; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

.draft-flag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px dashed var(--muted);
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Cards: Connect (kaytranada.com), Listen (dekialem.com), News (antonwesterlin.dk) ---------- */

.card {
  padding: 0;
  border: 0;
  max-height: calc(100svh - 32px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}

.card[open] { opacity: 1; transform: none; }

@starting-style {
  .card[open] { opacity: 0; transform: translateY(18px); }
}

.card::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: background 0.35s ease, overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
.card[open]::backdrop { background: rgba(0, 0, 0, 0.6); }
@starting-style {
  .card[open]::backdrop { background: rgba(0, 0, 0, 0); }
}

.card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.card-close svg { width: 13px; height: 13px; }

/* Connect: an 85 × 55 mm business card in bronze on the sleeve's cream stock,
   dropped slightly askew, with Subscribe set under it on the dark page */
.connect {
  width: min(560px, calc(100vw - 32px));
  overflow: visible;
  background: none;
  color: var(--fg);
  font-family: var(--print);
}

/* Subscribe sits straight on the page, so the page behind dims further */
.connect[open]::backdrop { background: rgba(8, 7, 7, 0.86); }

.connect .card-close { position: static; justify-self: end; margin: 0 -8px 16px 0; color: var(--fg); }

.connect-inner { display: grid; }

.bcard {
  aspect-ratio: 85 / 55;
  padding: clamp(18px, 5.5%, 32px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  background: var(--paper) url("paper-1400.webp") center / cover;
  color: var(--bronze);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 24px 60px rgba(0, 0, 0, 0.55);
  rotate: -1.2deg;
  transition: rotate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@starting-style {
  .connect[open] .bcard { rotate: -5deg; }
}

.bcard .at-mark { width: clamp(72px, 19%, 108px); color: var(--bronze); }

.bcard-name {
  justify-self: end;
  margin: 0;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.2em;
  line-height: 1.7;
  text-transform: uppercase;
}

.bc-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-soft);
}

.bcard-contact { grid-column: 1; grid-row: 3; display: grid; gap: 3px; align-content: end; }
.bcard-contact a { font-size: 14px; letter-spacing: 0.02em; }

.bcard-links {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.75;
  text-transform: uppercase;
}

.bcard a:hover { text-decoration: underline; text-underline-offset: 3px; }

.bc-sub { display: grid; gap: 10px; margin-top: 28px; }
.bc-sub .bc-label { color: var(--muted); }

.bc-form { display: flex; border-bottom: 1px solid rgba(242, 240, 234, 0.35); }
.bc-form:focus-within { border-color: var(--fg); }

.bc-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: 15px var(--print);
}
.bc-form input::placeholder { color: rgba(242, 240, 234, 0.35); }
.bc-form input:focus { outline: none; }

.bc-form button {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bc-sub .form-note { margin: 0; min-height: 0; }
.bc-sub .fineprint { margin: 0; font-size: 10px; color: var(--muted); }

/* Listen: one row per streaming service with a black Play button */
.listen {
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  color: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.listen-inner { position: relative; }
.listen img { width: 100%; aspect-ratio: 400 / 183; object-fit: cover; }
.listen .card-close { color: #fff; }

.listen-head {
  padding: 10px 16px 12px;
  text-align: center;
  font: 10px/1.5 var(--mono);
  color: #999;
  border-bottom: 1px solid #eee;
}
.listen-head strong { display: block; font-weight: 400; color: #666; }

.services { margin: 0; padding: 0 16px 8px; list-style: none; }

.services li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #eee;
}

.service {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 14px/1 var(--font);
  letter-spacing: -0.01em;
}
.service svg { width: 20px; height: 20px; flex: none; }

.play {
  width: 85px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #000;
  color: #fff;
  font: 13px var(--font);
}
.play:hover { background: #333; }

/* News: Anton's newsletter page as a full black overlay, in English */
.news {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  background: #000;
  color: #fff;
  transform: none;
}
.news[open] { display: grid; place-items: center; }
@starting-style {
  .news[open] { opacity: 0; transform: none; }
}

.news .card-close { top: 20px; right: clamp(16px, 2.8vw, 40px); color: #fff; }

.news-inner { width: min(600px, calc(100vw - 32px)); }

.news h2 { margin: 0 0 19px; font-size: 28px; font-weight: 500; line-height: 28px; text-align: center; }

.news-form { display: flex; gap: 10px; }

.news-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 12px 15px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: 14px var(--font);
}
.news-form input::placeholder { color: rgba(255, 255, 255, 0.6); }
.news-form input:focus { outline: none; box-shadow: 0 0 0 1px #fff; }

.news-form button {
  height: 48px;
  padding: 0 15px;
  border: 1px solid #fff;
  font-size: 13px;
  white-space: nowrap;
}
.news-form button:hover { background: #fff; color: #000; }

.news-small { margin: 11px 0 0; font-size: 12px; font-weight: 300; line-height: 16.8px; }
.news-small a { text-decoration: underline; text-underline-offset: 2px; }
.news .form-note { min-height: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .site-header { padding-block: 14px; }
  .site-header .at-mark { width: 52px; }
  .site-nav { gap: 18px; }
  .site-nav a, .site-nav button { font-size: 12px; letter-spacing: 0.1em; }

  .product { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .product-info { position: static; padding: 24px 0 0; }
}

@media (max-width: 480px) {
  .site-nav { gap: 20px; }
  .site-nav a::before, .site-nav button::before { right: calc(100% + 4px); }
  .site-nav a, .site-nav button { font-size: 11px; letter-spacing: 0.06em; }
  .waitlist { flex-direction: column; }
  .waitlist .buy { width: 100%; }
  .bcard { aspect-ratio: auto; min-height: 230px; row-gap: 20px; }
  .bcard-links { grid-row: 2; align-self: end; }
  .bcard-contact { grid-column: 1 / -1; }
  .bcard-contact a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*) { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ticker-track { animation: none; }
}
