/* =====================================================================
   THE LOCAL WRAP — styles

   1. Colours        (change these to experiment)
   2. Type & spacing
   3. Base
   4. Header & nav
   5. Blocks (the coloured sections)
   6. Section details
   7. Form
   8. Footer
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. COLOURS
   Palette sampled from the page backgrounds of the Nov 2026 issue.
   Each section picks one of these as its background.
   Tip: open the site with ?palette on the end of the address
   (e.g. index.html?palette) for live colour pickers.
   --------------------------------------------------------------------- */
:root {
  /* palette */
  --c-paper:      #FFFFFF;   /* page and header background */
  --c-ink:        #3A3434;   /* text, logo grey */
  --c-muted:      #6F6868;   /* quieter text */
  --c-pink:       #F8E6E6;
  --c-pink-deep:  #F2D2D2;
  --c-green:      #D5E6DB;
  --c-green-deep: #BFD9C8;
  --c-cream:      #F1F0CF;
  --c-lilac:      #E7E6F3;
  --c-aqua:       #D4E8E4;
  --c-peach:      #F4DACC;
  --c-charcoal:   #3A3434;

  /* which colour each block uses */
  --about-bg:       var(--c-pink);
  --issues-bg:      var(--c-green);
  --advertising-bg: var(--c-cream);
  --stockists-bg:   var(--c-lilac);
  --submissions-bg: var(--c-aqua);
  --contact-bg:     var(--c-pink-deep);
  --footer-bg:      var(--c-charcoal);
  --footer-text:    #EFE9E9;

  /* buttons and links */
  --accent:         var(--c-ink);
  --accent-text:    var(--c-paper);

  /* Set --block-gap to e.g. 1rem to show the blocks as separate
     rectangles with the page colour between them. 0 = edge to edge. */
  --block-gap:    0rem;
  --block-radius: 0rem;
}


/* ---------------------------------------------------------------------
   2. TYPE & SPACING
   --------------------------------------------------------------------- */
:root {
  --font-body: 'Jost', 'Avenir Next', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'Courier New', monospace;

  --gutter:   clamp(1rem, 5vw, 4rem);     /* side padding */
  --measure:  68rem;                      /* max content width */
  --header-h: 7.75rem;
}


/* ---------------------------------------------------------------------
   3. BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: 0.5rem 1rem; background: var(--c-ink); color: var(--c-paper);
  z-index: 100;
}
.skip:focus { top: 1rem; }

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; text-wrap: balance; }

h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.small { font-size: 0.9rem; color: var(--c-muted); }
.small a { color: var(--c-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}


/* ---------------------------------------------------------------------
   4. HEADER & NAV  (logo top left, simple text links to the right)
   --------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
  min-height: var(--header-h);
  padding: 0.75rem var(--gutter);
  background: var(--c-paper);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.brand img { width: 6.25rem; height: 6.25rem; }  /* 100 px */

.nav ul {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem;
  margin: 0; padding: 0; list-style: none;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--c-ink); }

/* On phones the header would take a fifth of the screen if it stayed stuck
   to the top, so it scrolls away with the page instead. */
@media (max-width: 720px) {
  html { scroll-padding-top: 1rem; }
  .site-header { position: static; justify-content: center; padding-top: 1rem; }
  .brand img { width: 5.25rem; height: 5.25rem; }
  .nav { width: 100%; }
  .nav ul { justify-content: center; gap: 0.25rem 1.1rem; }
  .nav a { font-size: 0.72rem; }
  .block .kicker { font-size: 0.72rem; letter-spacing: 0.04em; }
}


/* ---------------------------------------------------------------------
   5. BLOCKS  (each section is a full-width rectangle in its own colour)
   --------------------------------------------------------------------- */
.block {
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  margin: 0 var(--block-gap) var(--block-gap);
  border-radius: var(--block-radius);
}
.block:first-child { margin-top: var(--block-gap); }

.block--about       { background: var(--about-bg); }
.block--issues      { background: var(--issues-bg); }
.block--advertising { background: var(--advertising-bg); }
.block--stockists   { background: var(--stockists-bg); }
.block--submissions { background: var(--submissions-bg); }
.block--contact     { background: var(--contact-bg); }

.wrap { max-width: var(--measure); margin: 0 auto; }

/* two columns on wide screens, one column on phones */
.wrap--split {
  display: grid; gap: 2.5rem 4rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 820px) {
  .wrap--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.section-intro {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 300;
  margin: 0.75rem 0 1.5rem;
  max-width: 40rem;
}

.ticks { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 0.65em;
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: var(--c-ink);
}

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--accent); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border: 2px solid var(--accent);
  border-radius: 2px; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.button:hover { transform: translateY(-1px); opacity: 0.92; }
.button--ghost { background: transparent; color: var(--c-ink); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1.25rem; }

.card {
  background: rgba(255, 255, 255, 0.55);
  padding: 1.5rem 1.75rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}
.card h3 { margin-bottom: 0.75rem; }


/* ---------------------------------------------------------------------
   6. SECTION DETAILS
   --------------------------------------------------------------------- */

/* About: big one-liner, then smaller blurb */
.block--about h1 {
  font-size: clamp(2.2rem, 6vw, 4.25rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin-bottom: 1.5rem;
}
.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 300;
  max-width: 36rem;
}
.lede--small { font-size: 1.05rem; color: var(--c-muted); }

/* Issues: grid of covers, Portside Review style */
.issues {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 3rem 2.5rem;
  margin: 2.5rem 0 0; padding: 0; list-style: none;
}
.issue { max-width: 22rem; }
.issue__cover {
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.issue__cover:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16); }
.issue__label {
  font-family: var(--font-mono); font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 1.5rem 0 0.5rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-ink);
}
.issue__date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--c-muted); margin-bottom: 0.75rem; }
.issue__blurb { font-size: 0.98rem; margin-bottom: 0.75rem; }
.issue__read {
  font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* Stockists: list flows into columns on wide screens */
.stockists {
  margin: 0 0 2rem; padding: 0; list-style: none;
  columns: 2; column-gap: 2.5rem;
}
@media (min-width: 820px) { .stockists { columns: 3; } }
.stockists li { break-inside: avoid; padding: 0.35rem 0; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.stockists__more { font-style: italic; color: var(--c-muted); border-bottom: 0 !important; }

/* Contact details */
.contacts { margin: 0; }
.contacts dt {
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted);
  margin-top: 1.25rem;
}
.contacts dd { margin: 0.25rem 0 0; font-size: 1.1rem; }


/* ---------------------------------------------------------------------
   7. FORM
   --------------------------------------------------------------------- */
.form { display: grid; gap: 0.35rem; }

.form label {
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 0.9rem;
}
.form label:first-of-type { margin-top: 0; }

.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit; color: inherit;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--c-ink); outline-offset: 0; border-color: transparent;
  background: var(--c-paper);
}

.form .button { justify-self: start; margin-top: 1rem; }
.form__status { min-height: 1.5em; margin: 0.5rem 0 0; font-size: 0.95rem; }
.form__status.is-error { color: #8A2D2D; }

/* hidden honeypot field to catch spam bots */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }


/* ---------------------------------------------------------------------
   8. FOOTER
   --------------------------------------------------------------------- */
.site-footer {
  padding: 2.5rem var(--gutter);
  background: var(--footer-bg); color: var(--footer-text);
  font-size: 0.95rem; text-align: center;
}
.site-footer .small { color: inherit; opacity: 0.7; }
