/* =====================================================================
   home.css — the front page as this month's edition cover.
   Extends styles.css; declares no new colour tokens beyond the gold
   highlight shared with edition.css.
   ===================================================================== */

.home { --gold: var(--sub-2); background: var(--sub-1); }
.home .site-footer { margin-top: 0; }

/* ---- hero cover ------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  color: var(--white);
  background: var(--main-1);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.16);
  transition: transform 12s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.is-loaded .hero-img { transform: scale(1.03); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 36, 68, 0.72) 0%, rgba(13, 36, 68, 0.12) 36%, rgba(13, 36, 68, 0.3) 58%, rgba(13, 36, 68, 0.94) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding: 5.2rem max(var(--gutter), env(safe-area-inset-left)) 4.2rem;
}
.hero-edition {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.55rem 0;
}
.hero-masthead {
  margin-top: 1.2rem;
  color: var(--white);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(3.2rem, 12vw, 11rem);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.22em;
  padding-bottom: 0.2em;
}
.hero-the { flex-basis: 100%; padding-left: 2.3em; margin-bottom: -0.5em; font-size: 0.34em; font-style: italic; font-weight: 600; line-height: 1; }
/* The illustrated Q (img/logo/siqn-mark-white-320.png) stands in for the
   typed Q. Measured from the art: its box is 0.96em for a bowl at cap
   height, the bowl's foot sits 0.18em above the box bottom, the ink starts
   0.06em in, and "uay" picks up 0.8em after the Q's left edge so the tail
   runs under the u like a typeset Q. */
.hero-q { display: inline-block; width: 0.96em; height: 0.96em; vertical-align: -0.184em; margin: 0 -0.16em 0 -0.056em; }
.hero-strap { margin-top: 0.8rem; font-style: italic; font-size: var(--fs-subheading); opacity: 0.92; max-width: 40rem; }
.hero-bottom {
  margin-top: auto;
  padding-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
}
.hero-lead-kicker { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.hero-lead-title { margin-top: 0.5rem; color: var(--white); font-size: var(--fs-display); line-height: 1.08; text-wrap: balance; }
.hero-lead-title a { color: inherit; text-decoration: none; }
.hero-lead-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.hero-lead-standfirst { margin-top: 0.8rem; font-size: var(--fs-subheading); line-height: 1.6; opacity: 0.9; max-width: 42rem; }
.hero-actions { display: grid; justify-items: start; gap: 0.8rem; }
.hero-open {
  display: inline-flex; align-items: center; gap: 0.8rem;
  min-height: 56px;
  padding: 0.9rem 1.6rem;
  background: var(--white);
  color: var(--main-1);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-body);
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-open svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--transition); }
.hero-open:hover { transform: translateY(-2px); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45); }
.hero-open:hover svg { transform: translateX(4px); }
.hero-meta { font-family: var(--font-ui); font-size: var(--fs-body); opacity: 0.85; }
.hero-countdown {
  position: absolute;
  z-index: 2;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: 1.2rem;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
/* Hero entrance */
.hero-edition, .hero-the, .hero-word, .hero-strap, .hero-lead, .hero-actions { opacity: 0; transform: translateY(20px); }
.hero-word, .hero-the { display: inline-block; clip-path: inset(0 -0.3em 100% -0.3em); transform: translateY(0.3em); }
.is-loaded .hero-edition, .is-loaded .hero-the, .is-loaded .hero-word,
.is-loaded .hero-strap, .is-loaded .hero-lead, .is-loaded .hero-actions {
  opacity: 1; transform: none; clip-path: inset(-0.2em -0.3em -35% -0.3em);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), clip-path 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.is-loaded .hero-edition { transition-delay: 0.1s; }
.is-loaded .hero-the { transition-delay: 0.25s; }
.is-loaded .hero-word:nth-of-type(2) { transition-delay: 0.38s; }
.is-loaded .hero-word:nth-of-type(3) { transition-delay: 0.52s; }
.is-loaded /* The illustrated Q (img/logo/siqn-mark-white-320.png) stands in for the
   typed Q. Measured from the art: its box is 0.96em for a bowl at cap
   height, the bowl's foot sits 0.18em above the box bottom, the ink starts
   0.06em in, and "uay" picks up 0.8em after the Q's left edge so the tail
   runs under the u like a typeset Q. */
.hero-q { display: inline-block; width: 0.96em; height: 0.96em; vertical-align: -0.184em; margin: 0 -0.16em 0 -0.056em; }
.hero-strap { transition-delay: 0.75s; }
.is-loaded .hero-lead { transition-delay: 0.95s; }
.is-loaded .hero-actions { transition-delay: 1.15s; }

@media (max-width: 860px) {
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-lead-standfirst { display: none; }
  .hero-countdown { display: none; }
}

/* ---- the promise ------------------------------------------------------- */
.home .demo-banner { margin: 0; }
.promise { background: var(--white); border-bottom: 1px solid var(--sub-2); }
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.promise-num { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.14em; color: var(--main-2); }
.promise-item h2 { margin-top: 0.4rem; font-size: var(--fs-heading); }
.promise-item p { margin-top: 0.6rem; color: var(--sub-3); }
@media (max-width: 760px) { .promise-grid { grid-template-columns: 1fr; } }

/* ---- sections of the page --------------------------------------------- */
.home-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--main-1);
}
.home-eyebrow { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--main-2); }
.home-eyebrow--light { color: var(--gold); }
.home-title { margin-top: 0.3rem; font-size: var(--fs-display); line-height: 1; }
.home-link { font-family: var(--font-ui); font-weight: 600; color: var(--main-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.home-link:hover { text-decoration: underline; }
.home-note { font-family: var(--font-ui); color: var(--sub-3); max-width: 26rem; }

/* ---- story tiles ------------------------------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.4rem) clamp(1.2rem, 2.4vw, 2rem);
}
.story-tile--lead { grid-column: span 2; grid-row: span 2; }
.story-tile-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.story-tile-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sub-2); }
.story-tile--lead .story-tile-media { aspect-ratio: 16 / 10; }
.story-tile-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.story-tile-link:hover .story-tile-img { transform: scale(1.05); }
.story-tile-read {
  position: absolute; top: 0.7rem; left: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 36, 68, 0.85);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
}
.story-tile-body { padding-top: 0.9rem; }
.story-tile-kicker { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--main-2); }
.story-tile-title { margin-top: 0.35rem; font-size: var(--fs-subheading); line-height: 1.22; transition: color 0.2s ease; text-wrap: balance; }
.story-tile--lead .story-tile-title { font-size: var(--fs-heading); line-height: 1.1; }
.story-tile-link:hover .story-tile-title { color: var(--main-2); }
.story-tile-standfirst { margin-top: 0.5rem; color: var(--black); font-size: var(--fs-body); line-height: 1.55; }
.story-tile--lead .story-tile-standfirst { font-size: var(--fs-subheading); }
.story-tile-meta { margin-top: 0.5rem; font-family: var(--font-ui); font-size: var(--fs-small); color: var(--sub-3); }
@media (max-width: 960px) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-tile--lead { grid-column: auto; grid-row: auto; }
}

.home-ad { padding-bottom: clamp(1rem, 3vw, 2rem); }

/* ---- shelf of back issues ------------------------------------------------ */
.home-section--shelf { background: var(--sub-2); }
.shelf { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 1.2rem; }
.shelf-track {
  display: flex;
  gap: clamp(1rem, 2.4vw, 1.8rem);
  padding: 0.6rem max(var(--gutter), calc((100vw - var(--container-max)) / 2 + var(--gutter))) 1.4rem;
  width: max-content;
  perspective: 1200px;
}
.shelf-cover {
  position: relative;
  flex: none;
  width: clamp(190px, 22vw, 250px);
  aspect-ratio: 3 / 4.1;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 3px;
  background: var(--main-1);
  color: var(--white);
  text-decoration: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0.9rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 14px 30px rgba(13, 36, 68, 0.22);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}
.shelf-cover::after {
  /* the fold of a printed cover */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent);
  z-index: 2;
}
.shelf-cover:hover { transform: rotateY(-12deg) translateY(-6px); box-shadow: 0 24px 44px rgba(13, 36, 68, 0.32); }
.shelf-cover.is-current { outline: 3px solid var(--gold); outline-offset: 3px; }
.shelf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s ease; }
.shelf-cover:hover .shelf-img { transform: scale(1.06); }
.shelf-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 36, 68, 0.8) 0%, rgba(13, 36, 68, 0.1) 34%, rgba(13, 36, 68, 0.2) 55%, rgba(13, 36, 68, 0.92) 100%); }
.shelf-top, .shelf-bottom { position: relative; z-index: 3; display: grid; gap: 0.25rem; }
.shelf-mast { font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; line-height: 1; border-bottom: 1px solid rgba(255, 255, 255, 0.5); padding-bottom: 0.35rem; }
.shelf-no { font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.shelf-badge { justify-self: start; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); background: var(--gold); color: var(--main-1); font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.shelf-lead { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-body); line-height: 1.2; }
.shelf-count { font-family: var(--font-ui); font-size: var(--fs-small); opacity: 0.8; }

/* ---- next edition band ------------------------------------------------------ */
.next-band { background: var(--main-1); color: var(--white); padding-block: clamp(3rem, 7vw, 5rem); }
.next-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: center; }
.next-title { margin-top: 0.4rem; color: var(--white); font-size: var(--fs-display); line-height: 1.1; max-width: 32rem; }
.next-copy { margin-top: 0.9rem; opacity: 0.85; max-width: 32rem; }
.next-contact { margin-top: 0.6rem; font-family: var(--font-ui); font-weight: 600; color: var(--gold); }
.next-clock { display: flex; gap: clamp(0.5rem, 2vw, 1rem); }
.clock-cell {
  min-width: clamp(4.2rem, 10vw, 6.4rem);
  padding: 0.9rem 0.4rem 0.7rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.clock-num { display: block; font-family: var(--font-heading); font-size: var(--fs-display); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-cell small { display: block; margin-top: 0.4rem; font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.clock-num.flip { animation: clock-flip 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes clock-flip { from { transform: translateY(-45%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 860px) { .next-grid { grid-template-columns: 1fr; } }

/* ---- section tiles ------------------------------------------------------------ */
.section-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.8rem, 2vw, 1.4rem); }
.section-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.1rem 1.2rem;
  color: var(--white);
  text-decoration: none;
  background: var(--main-1);
}
.section-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.section-tile-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 36, 68, 0.88), rgba(13, 36, 68, 0.1) 70%); transition: background 0.4s ease; }
.section-tile-name, .section-tile-count { position: relative; z-index: 2; }
.section-tile-name { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-heading); }
.section-tile-count { font-family: var(--font-ui); font-size: var(--fs-small); opacity: 0.85; }
.section-tile:hover .section-tile-img { transform: scale(1.07); }
.section-tile:hover .section-tile-shade { background: linear-gradient(0deg, rgba(13, 36, 68, 0.92), rgba(13, 36, 68, 0.25) 70%); }
@media (max-width: 760px) { .section-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- scroll reveal ---------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease var(--d, 0s), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.shelf-cover.reveal.is-in:hover { transform: rotateY(-12deg) translateY(-6px); }

/* ---- extra ad spots ------------------------------------------------------ */
.home-ad:has(> [data-slot]:empty), .ad-strip:empty { display: none; } /* no advert booked: no gap */
.home-ad--gap { padding-top: clamp(2rem, 5vw, 3.5rem); }
.ad--small {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  min-height: 220px;
}
.ad--small .logo-placeholder { margin: 0 0 0.3rem; }
.ad--small .ad-business { font-size: var(--fs-subheading); margin: 0; }
.ad--small .ad-offer { margin: 0.2rem 0; }
.ad--tile { height: 100%; }
.ad-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1.4rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
@media (max-width: 760px) { .ad-strip { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero-img { transform: none !important; }
  .hero-edition, .hero-the, .hero-word, .hero-strap, .hero-lead, .hero-actions { opacity: 1; transform: none; clip-path: none; }
}

.next-actions { margin-top: 1.4rem; }
