/* /offers/spacest-promo-code/ — "Milan magazine": cream paper, raspberry ink, a sealed coupon.
   A nod to Spacest (ex-Roomless, Milan): its raspberry accent and rounded, friendly type. */

.po--spacest {
  --po-accent: #e03060;
  --po-accent-ink: #fff;
  --po-accent-soft: #ffe3ea;
  --po-deep: #2a0a17;
  --po-paper: #fbf6f1;
  --po-line: rgba(42, 10, 23, 0.14);
  --sp-ink: #1c1418;
}

/* ---------- Cover ---------- */
.sp-cover {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(42rem 28rem at 105% 10%, rgba(224, 48, 96, 0.16), transparent 62%),
    radial-gradient(30rem 20rem at -10% 100%, rgba(224, 48, 96, 0.08), transparent 60%),
    var(--po-paper);
  color: var(--sp-ink);
}

.sp-mast {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 2px solid var(--sp-ink);
  border-bottom: 1px solid var(--sp-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.sp-mast i { font-style: normal; color: var(--po-accent); }
.sp-mast__issue { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-style: italic; letter-spacing: 0.04em; text-transform: none; font-size: 0.95rem; font-weight: 600; }

.sp-cover__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.sp-kicker {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--po-accent);
}

.sp-cover__title {
  font-family: var(--fh-font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.sp-cover__title em {
  padding-right: 0.08em; /* the italic overhang otherwise touches the next word */
  font-style: italic;
  color: var(--po-accent);
  background: linear-gradient(transparent 68%, rgba(224, 48, 96, 0.18) 68%);
}

.sp-cover__dek { max-width: 36rem; margin: 1.4rem 0 0; font-size: 1.125rem; color: #4a3a41; }

.sp-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--po-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}
.sp-countdown b { color: var(--po-accent); font-variant-numeric: tabular-nums; }
.sp-countdown__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--po-accent); box-shadow: 0 0 0 0 rgba(224, 48, 96, 0.5); animation: sp-pulse 2s infinite; }
@keyframes sp-pulse { 70% { box-shadow: 0 0 0 10px rgba(224, 48, 96, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 48, 96, 0); } }

.sp-cover__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font: 800 1rem/1.1 var(--fh-font-body, 'DM Sans', sans-serif);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.sp-btn:hover { transform: translateY(-2px); }
.sp-btn--primary { background: var(--po-accent); color: #fff; box-shadow: 0 12px 28px rgba(224, 48, 96, 0.35); }
.sp-btn--primary.is-copied { background: #15803d; box-shadow: none; }
.sp-btn--ghost { background: transparent; color: var(--sp-ink); border: 1.5px solid var(--sp-ink); }
.sp-btn--light { background: #fff; color: var(--po-deep); }

/* ---------- The sealed coupon ---------- */
.sp-coupon-wrap { display: flex; justify-content: center; }
.sp-coupon {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 25rem);
  padding: 1.6rem 1.6rem 1.4rem;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 62%, var(--po-paper) 0 14px, transparent 15px),
    radial-gradient(circle at 100% 62%, var(--po-paper) 0 14px, transparent 15px),
    #fff;
  color: var(--sp-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 30px 70px rgba(42, 10, 23, 0.18), 0 2px 0 rgba(42, 10, 23, 0.06);
  transform: rotate(1.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sp-coupon:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 36px 80px rgba(42, 10, 23, 0.22); }
.sp-coupon:focus-visible { outline-offset: 8px; }
.sp-coupon__top { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sp-coupon__brand { display: inline-flex; align-items: center; gap: 0.4rem; letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
.sp-coupon__type { color: var(--po-accent); }
.sp-coupon__off {
  margin-top: 0.8rem;
  font-family: var(--fh-font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(5rem, 11vw, 7rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--po-accent);
}
.sp-coupon__off small { font-size: 0.5em; letter-spacing: 0; }
.sp-coupon__what { font-weight: 700; color: #4a3a41; }
.sp-coupon__rule { margin: 1.2rem -1.6rem 1rem; border-top: 2px dashed rgba(42, 10, 23, 0.18); }
.sp-coupon__label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--of-muted); }
.sp-coupon__seal {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  margin-top: 0.5rem;
  border-radius: 14px;
  background: var(--po-accent-soft);
  overflow: hidden;
}
.sp-coupon__strip {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, #e03060 0 14px, #c81f50 14px 28px);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 0.55s cubic-bezier(0.6, -0.2, 0.3, 1.2), opacity 0.4s ease 0.15s;
}
.sp-coupon__strip span { padding: 0.35rem 0.8rem; border-radius: 999px; background: rgba(42, 10, 23, 0.35); }
.sp-coupon:hover .sp-coupon__strip { transform: translateX(-6px) rotate(-1deg); }
.is-revealed .sp-coupon__strip,
html[class*="revealed-"] .sp-coupon__strip { transform: translateX(-110%) rotate(-8deg) !important; opacity: 0; pointer-events: none; }
.sp-coupon__code {
  width: 100%;
  padding: 0 1rem;
  text-align: center;
  font: 800 clamp(1.6rem, 4vw, 2rem)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  color: var(--po-deep);
}
.sp-coupon__hint { margin-top: 0.75rem; font-size: 0.85rem; font-weight: 700; color: var(--of-muted); }
.sp-coupon.is-copied .sp-coupon__hint { color: var(--of-ok); }
.sp-coupon__stamp {
  position: absolute;
  right: -1.1rem;
  top: 3.2rem;
  display: grid;
  place-items: center;
  width: 6.2rem;
  height: 6.2rem;
  border: 2px solid var(--po-accent);
  border-radius: 50%;
  color: var(--po-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(14deg);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px rgba(224, 48, 96, 0.5);
}

.sp-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--sp-ink);
}
.sp-facts li { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1rem 0 0; }
.sp-facts li + li { padding-left: 1rem; border-left: 1px solid var(--po-line); }
.sp-facts strong { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.sp-facts span { font-size: 0.875rem; color: var(--of-muted); }

/* ---------- Ticker ---------- */
.sp-ticker { overflow: hidden; background: var(--po-accent); color: #fff; border-top: 2px solid var(--sp-ink); border-bottom: 2px solid var(--sp-ink); }
.sp-ticker__track { display: flex; width: max-content; animation: sp-ticker 38s linear infinite; }
.sp-ticker__track span {
  padding: 0.85rem 1.4rem;
  font-family: var(--fh-font-display, 'Fraunces', Georgia, serif);
  font-size: 1.15rem;
  font-style: italic;
  white-space: nowrap;
}
.sp-ticker__track span::after { content: '✦'; margin-left: 2.8rem; font-style: normal; opacity: 0.7; }
@keyframes sp-ticker { to { transform: translateX(-50%); } }

/* ---------- How ---------- */
.sp-how { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sp-ink); }
.sp-steps li { padding: 1.5rem 1.5rem 0.5rem 0; }
.sp-steps li + li { padding-left: 1.5rem; border-left: 1px solid var(--po-line); }
.sp-steps__num { display: block; font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: 3.2rem; font-style: italic; font-weight: 600; line-height: 1; color: var(--po-accent); }
.sp-steps h3 { margin-top: 0.8rem; font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.sp-steps p { margin: 0.55rem 0 0.8rem; color: var(--of-muted); }
.sp-steps a,
.sp-link-btn { padding: 0; border: 0; background: none; font: 800 0.95rem/1.4 var(--fh-font-body, 'DM Sans', sans-serif); color: var(--po-accent); text-decoration: none; cursor: pointer; }
.sp-steps a:hover,
.sp-link-btn:hover { text-decoration: underline; }
.sp-link-btn.is-copied { color: var(--of-ok); }

/* ---------- Homes (magazine spread) ---------- */
.po-homes--spacest { background: #fff; border-top: 1px solid var(--po-line); }
.po-homes--spacest .po-home a { border-radius: 4px; border: 0; box-shadow: 0 0 0 1px var(--po-line); }
.po-homes--spacest .po-home__media { aspect-ratio: 4 / 3; }
.po-homes--spacest .po-home__title { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-weight: 600; font-size: 1.05rem; }
/* Magazine spread: the first home is the cover story (2×2), eight smaller ones around it. */
.po-homes--spacest .po-home:first-child { grid-column: span 2; grid-row: span 2; }
.po-homes--spacest .po-home:first-child a { height: 100%; }
.po-homes--spacest .po-home:first-child .po-home__media { flex: 1; aspect-ratio: auto; min-height: 16rem; }
.po-homes--spacest .po-home:first-child .po-home__title { font-size: 1.5rem; -webkit-line-clamp: 3; }
@media (max-width: 420px) {
  .po-homes--spacest .po-home:first-child { grid-column: auto; grid-row: auto; }
}

/* ---------- Where ---------- */
.sp-where { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.sp-cities { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--sp-ink); }
.sp-city {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--po-line);
}
.sp-city__name { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.sp-city__name small { margin-left: 0.75rem; font-family: var(--fh-font-body, 'DM Sans', sans-serif); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--of-muted); }
.sp-city__count { color: var(--of-muted); }
.sp-city__count strong { color: var(--po-accent); font-size: 1.15rem; }
.sp-city__links { display: flex; gap: 1.25rem; font-weight: 800; }
.sp-city__links a { color: var(--sp-ink); text-decoration: none; }
.sp-city__links a:first-child { color: var(--po-accent); }
.sp-city__links a:hover { text-decoration: underline; }

/* ---------- Good to know ---------- */
.sp-know { padding: clamp(3.5rem, 8vw, 5.5rem) 0; background: var(--po-accent-soft); }
.sp-know__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.sp-fact { padding: 1.4rem; border-radius: 4px; background: var(--po-paper); box-shadow: 0 1px 0 rgba(42, 10, 23, 0.08); }
.sp-fact-label { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--po-accent); }
.sp-fact-value { margin: 0.5rem 0 0; font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.sp-fact-note { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--of-muted); }

/* ---------- Final ---------- */
.sp-final { padding: clamp(3.5rem, 8vw, 5.5rem) 0; background: var(--po-accent); color: #fff; text-align: center; }
.sp-final .sp-kicker { color: rgba(255, 255, 255, 0.85); }
.sp-final h2 { max-width: 40rem; margin: 0 auto; font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
.sp-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }
.sp-final__code {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0.6rem 0.7rem 0.6rem 1.3rem;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  background: rgba(42, 10, 23, 0.25);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.sp-final__code-text { font: 800 1.3rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.sp-final__code-hint { padding: 0.55rem 0.9rem; border-radius: 10px; background: #fff; color: var(--po-deep); font-weight: 800; font-size: 0.9rem; }
.sp-final__code.is-copied { border-style: solid; }

.po-bar--spacest .po-bar__code { font-size: 0.95rem; }

@media (max-width: 900px) {
  .sp-cover__grid { grid-template-columns: 1fr; }
  .sp-coupon-wrap { order: -1; padding: 0 0.75rem; }
  .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .sp-know__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sp-mast span:last-child { display: none; }
  .sp-steps { grid-template-columns: 1fr; }
  .sp-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--po-line); }
  .sp-city { grid-template-columns: 1fr; gap: 0.5rem; }
  .sp-know__grid { grid-template-columns: 1fr; }
  .sp-coupon__stamp { right: -0.5rem; width: 5.2rem; height: 5.2rem; font-size: 0.6rem; }
  .sp-cover__actions .sp-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-ticker__track { animation: none; }
  .sp-countdown__dot { animation: none; }
}

/* Revealed code fills the seal (the strip above slides away). */
.is-revealed .sp-coupon__code,
html[class*="revealed-"] .sp-coupon__code { display: block; }

/* The coupon is a link to Spacest homes now (the code comes with "Book on Spacest" on a listing). */
a.sp-coupon, a.sp-coupon * { text-decoration: none; }
a.sp-coupon { color: inherit; }

/* Phones: the bar names the offer (no code on this page) next to the way to the homes. */
.po-bar--spacest .po-bar__info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; min-height: 52px; padding: 0 0.9rem; border-radius: 14px; background: var(--po-accent-soft, #fdecf0); color: var(--po-deep, #2a0f17); line-height: 1.15; }
.po-bar--spacest .po-bar__info b { font-size: 1rem; font-weight: 800; }
.po-bar--spacest .po-bar__info small { font-size: 0.78rem; font-weight: 600; opacity: 0.8; }
