/* ============================================================
   hug — shared stylesheet
   ============================================================ */

@font-face {
  font-family: 'Function';
  src: url('https://hug.band/assets/fonts/f.woff2') format('woff2'),
       url('https://hug.band/assets/fonts/f.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Function';
  src: url('https://hug.band/assets/fonts/fb.woff2') format('woff2'),
       url('https://hug.band/assets/fonts/fb.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:    #ffeedd; /* condensed-milk cream */
  --ink:   #221f1a; /* rain-cloud ink */
  --frog:  #3f6b3f; /* frog green */
  --milk:  #f0e2c8; /* deeper milk tone, for cards */
  --rain:  #7a8b99; /* rain grey-blue */
  --line:  rgba(34, 31, 26, 0.14);
  --max:   1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Function', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--frog);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(1.5rem, 4vw, 2.75rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

.masthead--footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.masthead__mark {
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead__byline {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rain);
  text-align: right;
  line-height: 1.6;
}

/* ---------- hero image ---------- */

.hero-frame {
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.hero-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- editorial text block ---------- */

.editorial {
  padding-top: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease-out 0.1s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .editorial { animation: none; opacity: 1; transform: none; }
}

.editorial__top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.headline {
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
}

.pullquote {
  position: relative;
  border-top: 2px solid var(--ink);
  padding: 1.1em 0 0;
}

.pullquote p {
  margin: 0;
  font-weight: 700;
  color: var(--frog);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.03;
  letter-spacing: -0.01em;
}

.editorial__rule {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
}

.credit-line {
  font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  max-width: none;
  width: 100%;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}

.credit-line strong { font-weight: 700; }

/* ---------- newsletter signup ---------- */

.signup {
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.signup__label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rain);
  margin-bottom: 0.75rem;
}

.signup-card {
  background: var(--milk);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.signup-card iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  background: var(--milk);
}

@media (max-width: 640px) {
  .editorial__top {
    grid-template-columns: 1fr;
  }
  .credit-line {
    white-space: normal;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  }
  .signup-card iframe {
    height: 380px;
  }
}

/* ============================================================
   embedded pages (subscribe / welcome) — shown inside the
   iframe on the homepage, and standalone if visited directly
   ============================================================ */

body.embed {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--milk);
  padding: 1.75rem;
}

.embed__inner {
  width: 100%;
  max-width: 680px;
  text-align: center;
}

.embed__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rain);
  margin: 0 0 0.6em;
}

.embed__heading {
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  margin: 0 0 0.5em;
  color: var(--ink);
}

.embed__copy {
  margin: 0 0 1.3em;
  font-size: 0.98rem;
  color: var(--ink);
}

.embed__error {
  margin: 0 0 1em;
  font-size: 0.85rem;
  color: #8a3324;
}

.form-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.form-row input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  font-family: 'Function', sans-serif;
  font-size: 0.95rem;
  padding: 0.75em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}

.form-row input[type="email"]::placeholder {
  color: var(--rain);
}

.btn {
  font-family: 'Function', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.8em 1.3em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--frog);
  color: #fff5e6;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { background: #345a34; }
.btn:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.embed__fine {
  margin-top: 1.1em;
  font-size: 0.7rem;
  color: var(--rain);
}

.embed__back {
  display: inline-block;
  margin-top: 1.4em;
  font-size: 0.8rem;
  color: var(--frog);
  font-weight: 700;
}

/* honeypot field — hidden from real people */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- release section (temp.php) ---------- */

.release {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.release > * {
  margin-top: 1.5rem;
}

.release > *:first-child {
  margin-top: 0;
}

.album-cover {
  width: 100%;
  display: block;
}

.audio-embed iframe {
  width: 100%;
  border: 0;
  display: block;
}

.buy-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.buy-links a {
  flex: 0 0 auto;
}

.buy-links img {
  height: clamp(180px, 30vw, 300px);
  width: auto;
  display: block;
}

.socials {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  padding: 0 0 clamp(2rem, 5vw, 3rem);
}

.socials img {
  width: clamp(19px, 6vw, 38px);
  height: auto;
  display: block;
}

.socials--top {
  justify-content: flex-start;
  gap: 1rem;
  width: auto;
  padding: clamp(1.25rem, 3vw, 2rem) 0 0;
}

.socials--top img {
  width: 18px;
  height: 18px;
}