/* ───────────── MAN — warm analog ─────────────
   cream paper · sepia ink · grain · serif
   Light-only by design. This is a record sleeve, not an app. */

:root {
  --paper:     #f4eee3;
  --paper-2:   #ece3d4;
  --paper-3:   #e2d7c4;
  --ink:       #251e17;
  --ink-2:     #4b4137;
  --ink-3:     #7d7062;
  --rule:      #d5c8b3;
  --accent:    #9c5233;   /* terracotta */
  --accent-2:  #b98a4e;   /* brass */
  --ok:        #4e6b47;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Hoefler Text", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --page: 68rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  letter-spacing: 0.006em;
  -webkit-font-smoothing: antialiased;
}

/* Film grain. One fixed overlay, multiply-blended, very low opacity.
   This is what stops the cream from reading as "default white page". */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0.42;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
}

/* A soft vignette so the paper has a center. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(60, 44, 28, 0.10) 100%);
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.75rem; }
.narrow { max-width: var(--measure); }

/* ───────────── type ───────────── */

h1, h2, h3 { font-weight: 400; letter-spacing: -0.012em; margin: 0; }

.display {
  font-size: clamp(3.4rem, 13vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0.06em;
  margin: 0;
}

.script {
  font-style: italic;
  font-family: var(--serif);
  color: var(--ink-2);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.lede { font-size: 1.3rem; line-height: 1.55; color: var(--ink-2); font-style: italic; }

/* The quote under the name. Understated — the name is the loud thing. */
.hero-quote { margin: 0; padding: 0; border: 0; }
.hero-quote p {
  font-size: 1.42rem;
  line-height: 1.45;
  color: var(--ink-2);
  font-style: italic;
  margin: 0 0 0.7rem;
  letter-spacing: 0.004em;
}
.hero-quote cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}


.muted { color: var(--ink-3); }

/* Hand-drawn rule: a slightly wobbly line, not a border. */
.rule {
  border: 0;
  height: 10px;
  margin: 3.5rem 0;
  background: no-repeat center/100% 10px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 C 120 2, 180 8, 300 5 S 480 2, 600 6' stroke='%23d5c8b3' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rule.short { max-width: 5rem; margin: 1.4rem 0; }

/* ───────────── hero ───────────── */

.hero {
  /* 92vh, but never taller than the photo wants to be — otherwise the hero
     grows unbounded on very tall displays and the songs fall off the world. */
  min-height: min(92vh, 860px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 4rem;
  padding: 5rem 0 4rem;
}

.hero-name { position: relative; }

.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-3);
  overflow: hidden;
  /* the sepia treatment is what unifies whatever photo you drop in */
  box-shadow: 0 30px 70px -30px rgba(50, 34, 20, 0.55);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.30) contrast(1.04) saturate(0.85) brightness(0.98);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(244,238,227,0.10), rgba(90,60,35,0.16));
  mix-blend-mode: multiply;
}
.photo-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ink-3);
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase;
  background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 12px, var(--paper-3) 12px, var(--paper-3) 24px);
  text-align: center; padding: 2rem;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; min-height: auto; padding-top: 3rem; }
  .hero-photo { aspect-ratio: 3 / 4; }
}

/* ───────────── songs ───────────── */

.songs { margin: 1rem 0 0; }

.song {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto auto;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.85rem 0;
  border-top: 1px solid var(--rule);
}
.song:last-child { border-bottom: 1px solid var(--rule); }

.song-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.song-title { font-size: 1.6rem; line-height: 1.2; }
.song-title a { color: var(--ink); }
.song-title a:hover { color: var(--accent); text-decoration: none; }

/* The page is quiet enough that a bare title doesn't read as a door. A small
   terracotta arrow says "this goes somewhere" without shouting — it's present
   on touch, where there is no hover to discover, and it steps forward when a
   pointer finds it. */
.song-title a::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--accent);
  opacity: 0.5;
  font-size: 0.8em;
  transform: translateY(-0.04em);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.song-title a:hover::after { opacity: 1; transform: translate(0.22rem, -0.04em); }
.song-note { color: var(--ink-3); font-style: italic; font-size: 0.98rem; margin-top: 0.3rem; }
.song-credit { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 0.45rem; text-transform: uppercase; }
.song-meta { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; }

/* The phone layout for songs lives in the mobile layer at the foot of this
   file — the row becomes a stack, not a table. */

/* preview button — a small circle, not a chunky control */
.prev-btn {
  appearance: none; border: 1px solid var(--rule); background: transparent;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  cursor: pointer; color: var(--ink-2);
  display: inline-grid; place-items: center; vertical-align: middle;
  transition: all 0.18s ease;
  font-size: 0.7rem; padding: 0;
}
.prev-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--paper-2); }
.prev-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ───────────── buttons ───────────── */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.big { padding: 1.05rem 2.4rem; font-size: 0.82rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ───────────── fields (the personal bit) ───────────── */

.fields-sec {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4.5rem;
  align-items: start;
}
.portrait {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-3);
  position: relative;
  box-shadow: 0 24px 50px -28px rgba(50, 34, 20, 0.5);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.34) contrast(1.03) saturate(0.8); }

.fields { display: grid; gap: 2.1rem; }
.field { }
.field-q {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}
.field-a { font-size: 1.16rem; line-height: 1.5; color: var(--ink); font-style: italic; }

@media (max-width: 860px) {
  .fields-sec { grid-template-columns: 1fr; gap: 2.5rem; }
  .portrait { max-width: 20rem; }
}

/* ───────────── ask me ───────────── */

.ask-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 860px) { .ask-sec { grid-template-columns: 1fr; gap: 2.5rem; } }

.ask-reply {
  margin-top: 2.25rem;
  padding: 1.5rem;
  border-left: 2px solid var(--accent-2);
  background: rgba(185, 138, 78, 0.07);
}

textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; border-color: var(--accent-2); }

select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  margin-bottom: 1.35rem;
}

.opt {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: none;
  opacity: 0.75;
  margin-left: 0.4rem;
}

/* honeypot — off-screen, never focusable, only bots find it */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ───────────── instagram ───────────── */

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  transition: color 0.18s ease;
}
.ig-link:hover { color: var(--accent); text-decoration: none; }
.ig-link .ig { flex: none; }
.ig-link.big { font-size: 0.95rem; }
.ig-link.big .ig { width: 20px; height: 20px; }

/* ───────────── inbox ───────────── */

.msgs { display: grid; gap: 1.25rem; max-width: 46rem; }
.msg {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 1.5rem;
}
.msg.done { opacity: 0.5; }
.msg-head { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 0.85rem; }
.msg-body { white-space: pre-wrap; margin: 0 0 1.1rem; line-height: 1.6; }

/* ───────────── card / forms (buy, listen, player) ───────────── */

.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 2.75rem;
  margin: 0 auto;
  box-shadow: 0 20px 50px -34px rgba(50, 34, 20, 0.5);
}
.card.center { text-align: center; }

label {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.45rem;
}
input[type=text], input[type=email], input[type=number], input[type=password] {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  margin-bottom: 1.35rem;
}
input:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; border-color: var(--accent-2); }

.err {
  border-left: 3px solid var(--accent);
  background: rgba(156, 82, 51, 0.07);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.96rem;
}

.price-tag {
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ───────────── player ───────────── */

.player-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.needle {
  width: 100%;
  height: 2px;
  background: var(--rule);
  margin: 2.5rem 0 0.9rem;
  position: relative;
  overflow: hidden;
}
.needle-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s linear;
}
.times {
  display: flex; justify-content: space-between;
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* ───────────── footer ───────────── */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 6rem;
  padding: 3rem 0 4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}
footer a { color: var(--ink-3); }
footer a:hover { color: var(--accent); }
.foot-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ───────────── prose (legal pages) ───────────── */

.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }

section { padding: 4.5rem 0; }
section.tight { padding: 2.5rem 0; }

/* ═════════════ the phone ═════════════
   Everything below is inside a max-width query, so the desktop rendering above
   is untouched. The phone is not a squeezed desktop: it's a column you fall
   down. Same paper, same ink, same grain — different architecture. One
   measure wide, everything stacked, nothing competing for the horizontal.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {

  /* Tighter gutter, and a body scale that stays readable held at arm's length. */
  .wrap { padding: 0 1.25rem; }
  body { font-size: 1.0625rem; line-height: 1.6; }

  /* The vignette is tuned for a wide canvas; on a narrow one it just darkens
     the edges of the text. Pull it back. */
  body::before { background: radial-gradient(130% 70% at 50% 25%, transparent 62%, rgba(60, 44, 28, 0.07) 100%); }

  /* No hover on a touch screen, so nothing should linger lit after a tap. */
  a, button { -webkit-tap-highlight-color: rgba(156, 82, 51, 0.12); }
  ::selection { background: rgba(185, 138, 78, 0.28); }

  /* Vertical rhythm: the desktop's 4.5rem sections are a canyon on a phone. */
  section { padding: 3.25rem 0; }
  section.tight { padding: 2rem 0; }
  .rule { margin: 2.5rem 0; }
  #ask, #songs, #about { scroll-margin-top: 1.5rem; }

  /* ── hero ──
     The photo goes full-bleed, edge to edge. On a phone a bordered photo reads
     as a thumbnail; a bleeding one reads as a record sleeve, which is the whole
     idea. The negative margin exactly cancels .wrap's gutter — no 100vw, so no
     horizontal scrollbar. */
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
    padding: 2.5rem 0 1rem;
  }
  .hero .display { font-size: clamp(3.6rem, 22vw, 6rem); letter-spacing: 0.04em; }
  .hero-quote p { font-size: 1.24rem; }
  .hero-photo {
    aspect-ratio: 4 / 5;
    margin-inline: -1.25rem;
    box-shadow: 0 24px 44px -30px rgba(50, 34, 20, 0.6);
  }

  /* ── the songs ──
     Not a table squeezed thin. Each song is a block you read top to bottom:
     number and title, the note, then the facts and the play button on one
     baseline. The desktop rule left the preview button orphaned under the
     track number — this puts it where a thumb expects it. */
  .song {
    grid-template-columns: 1.9rem 1fr auto;
    column-gap: 0.9rem;
    row-gap: 0.85rem;
    align-items: start;
    padding: 1.5rem 0;
  }
  .song-num       { grid-column: 1; grid-row: 1; padding-top: 0.4rem; }
  .song > div:nth-child(2) { grid-column: 2; grid-row: 1; }
  .song > .prev-btn,
  .song > span:last-child  { grid-column: 3; grid-row: 1; justify-self: end; }
  .song-meta {
    grid-column: 2 / -1; grid-row: 2;
    justify-self: start;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
  .song-title { font-size: 1.5rem; }
  .song-note  { font-size: 0.95rem; }

  /* 46px — a thumb, not a mouse pointer. */
  .prev-btn { width: 2.9rem; height: 2.9rem; font-size: 0.78rem; }

  /* ── buttons ──
     On a phone the primary action gets the full width of the column. A
     centred pill floating in a wide field is a desktop habit. */
  .btn { width: 100%; padding: 1.05rem 1.4rem; }
  .btn.big { padding: 1.15rem 1.4rem; font-size: 0.8rem; }
  .btn:hover { background: var(--ink); border-color: var(--ink); }   /* kill sticky hover */
  .btn.ghost:hover { background: transparent; color: var(--ink); }
  .btn:active { background: var(--accent); border-color: var(--accent); color: var(--paper); }
  .prev-btn { width: 2.9rem; }

  /* ── cards & forms ── */
  .card { padding: 1.6rem 1.35rem; box-shadow: 0 14px 34px -28px rgba(50, 34, 20, 0.5); }
  .price-tag { font-size: 2.6rem; }

  /* 16px is the floor. Below it, iOS Safari zooms the whole page on focus and
     the visitor is left pinching their way back out mid-purchase. */
  input[type=text], input[type=email], input[type=number], input[type=password],
  textarea, select { font-size: 16px; padding: 0.9rem 0.95rem; }

  /* ── the personal fields ── */
  .fields-sec { gap: 2rem; }
  .fields { gap: 1.75rem; }
  .field-a { font-size: 1.1rem; }
  .portrait {
    max-width: none;
    margin-inline: -1.25rem;        /* bleeds, like the hero */
    aspect-ratio: 4 / 3;            /* a square portrait eats a whole phone screen */
    box-shadow: 0 18px 38px -28px rgba(50, 34, 20, 0.55);
  }

  /* ── ask ── */
  .ask-sec { gap: 2rem; }
  .lede { font-size: 1.18rem; }
  .ask-reply { padding: 1.15rem 1.2rem; margin-top: 1.75rem; }

  /* ── player ──
     100dvh, not 100vh: on mobile Safari and Chrome the URL bar slides away and
     100vh overflows by exactly its height, which pushes the needle under the
     fold at the worst possible moment. env(safe-area-inset-*) keeps the whole
     stage clear of the notch and the home indicator. */
  .player-stage {
    min-height: 100dvh;
    padding: 2.5rem 1.35rem calc(2.5rem + env(safe-area-inset-bottom));
    padding-top: calc(2.5rem + env(safe-area-inset-top));
  }
  .needle { height: 3px; margin: 2rem 0 0.8rem; }   /* thicker: it's the only moving thing */
  .times { font-size: 0.78rem; }

  /* ── footer ── */
  footer {
    margin-top: 3.5rem;
    padding: 2.25rem 0 calc(2.5rem + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    text-align: left;
  }
  .foot-links { gap: 1.1rem; row-gap: 0.6rem; }

  /* ── inbox ── */
  .msg { padding: 1.15rem; }
}

/* Small phones — an iPhone SE is 375px wide, and the name is the loudest thing
   on the page, so it's the first thing to overrun. */
@media (max-width: 400px) {
  .wrap { padding: 0 1rem; }
  .hero-photo, .portrait { margin-inline: -1rem; }
  .hero .display { font-size: clamp(3rem, 20vw, 4.6rem); }
  .song { grid-template-columns: 1.5rem 1fr auto; column-gap: 0.7rem; }
  .song-title { font-size: 1.35rem; }
  .card { padding: 1.35rem 1.1rem; }
}

/* Phone held sideways: the player is the only page anyone does this for, and a
   100dvh grid in landscape leaves the needle squashed against the fold. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .player-stage { min-height: auto; padding: 2rem 1.5rem; }
  .player-stage h1 { font-size: 1.8rem !important; margin: 0.6rem 0 0.3rem; }
  .needle { margin: 1.25rem 0 0.6rem; }
  .player-stage #status { margin-top: 1.5rem !important; }
}
