/* Open Living — ImageWriter brochure. The paper IS the site. */

@font-face {
  font-family: "ChicagoFLF";
  src: url("assets/ChicagoFLF.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #eae3d0;
  --paper-deep: #e0d6be;
  --ink: #1a1813;
  --ink-soft: rgba(26, 24, 19, 0.28);
  --hole: #1a1813;
  --chicago: "ChicagoFLF", monospace;
  /* Tractor strip at the edge */
  --strip: clamp(28px, 4.2vw, 48px);
  --gutter: clamp(14px, 2vw, 28px);
  --measure: min(100%, 56rem); /* wider than the old 760px card, not strip-to-strip */
  --hole-r: clamp(4.5px, 0.55vw, 7px);
  --hole-pitch: clamp(44px, 5.5vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--chicago);
  min-height: 100vh;
}

/* Soft grain so the paper reads as stock, not flat fill */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

.desk { min-height: 100vh; }

/* Full-bleed continuous form: holes at the viewport edges */
.sheet {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    /* faint aged wash at the extreme edges */
    linear-gradient(
      90deg,
      var(--paper-deep) 0,
      transparent calc(var(--strip) * 0.85),
      transparent calc(100% - var(--strip) * 0.85),
      var(--paper-deep) 100%
    ),
    radial-gradient(
      circle var(--hole-r) at calc(var(--strip) / 2) calc(var(--hole-pitch) / 2),
      var(--hole) var(--hole-r),
      transparent calc(var(--hole-r) + 0.6px)
    ),
    radial-gradient(
      circle var(--hole-r) at calc(100% - var(--strip) / 2) calc(var(--hole-pitch) / 2),
      var(--hole) var(--hole-r),
      transparent calc(var(--hole-r) + 0.6px)
    );
  background-size:
    100% 100%,
    100% var(--hole-pitch),
    100% var(--hole-pitch);
  background-repeat: no-repeat, repeat-y, repeat-y;
}

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--ink-soft);
  pointer-events: none;
  z-index: 1;
}
.sheet::before { left: var(--strip); }
.sheet::after  { right: var(--strip); }

/* Printable area runs strip-to-strip — this is the page measure */
.page {
  position: relative;
  z-index: 1;
  width: var(--measure);
  max-width: none;
  margin: 0 auto;
  padding:
    clamp(14px, 2.2vw, 28px)
    clamp(16px, 2.5vw, 32px)
    clamp(48px, 7vw, 88px);
}

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

.hero {
  border: 2.5px solid var(--ink);
  background: #fff;
  overflow: hidden;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* ---------- wordmark + rule ---------- */

.wordmark {
  margin: clamp(20px, 3.2vw, 36px) 0 12px;
  text-align: center;
  font-family: var(--chicago);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.rule {
  border: 0;
  border-top: 2.5px solid var(--ink);
  margin: 0 auto clamp(16px, 2.5vw, 26px);
  width: 100%;
}

.lede {
  text-align: center;
  font-size: clamp(15px, 2.15vw, 22px);
  line-height: 1.5;
  max-width: 46em;
  margin: 0 auto clamp(28px, 4.5vw, 52px);
}

/* ---------- two columns — fill the printable width ---------- */

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  font-size: clamp(14px, 1.65vw, 18px);
  line-height: 1.62;
}
.columns .col p + p { margin-top: 1.15em; }

/* ---------- coupon — same measure as the columns ---------- */

.coupon {
  position: relative;
  margin: clamp(36px, 5.5vw, 64px) 0 0;
  width: 100%;
  max-width: none;
  border: 2.5px dashed rgba(26, 24, 19, 0.72);
  padding: clamp(22px, 3.5vw, 40px) clamp(20px, 4vw, 48px);
  text-align: center;
}
.coupon-scissors {
  position: absolute;
  top: -13px;
  left: 14px;
  width: clamp(22px, 2.4vw, 28px);
  height: clamp(22px, 2.4vw, 28px);
  color: rgba(26, 24, 19, 0.78);
  background: var(--paper);
  padding: 0 3px;
}
.coupon-line {
  font-size: clamp(18px, 2.6vw, 28px);
  line-height: 1.25;
  margin-bottom: 10px;
}
.coupon-sub {
  font-size: clamp(13px, 1.7vw, 16px);
  line-height: 1.45;
}

/* ---------- folio ---------- */

.folio {
  margin-top: clamp(28px, 4.5vw, 48px);
  text-align: center;
  font-size: clamp(13px, 1.7vw, 16px);
  letter-spacing: 0.02em;
  padding-bottom: 4px;
}

/* ---------- motion: visible by default ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .print-in {
    animation: print-in 380ms cubic-bezier(0.19, 1, 0.22, 1) both;
    animation-delay: var(--d, 0ms);
  }
  @keyframes print-in {
    from {
      opacity: 0.4;
      filter: blur(0.5px);
      transform: translateY(3px);
    }
    to {
      opacity: 1;
      filter: none;
      transform: none;
    }
  }
}

@media (max-width: 640px) {
  :root {
    --strip: clamp(24px, 8vw, 32px);
    --measure: 100%;
  }
  .page {
    padding-inline: calc(var(--strip) + 10px);
  }
  .columns {
    grid-template-columns: 1fr;
    gap: 1.15em;
  }
  .lede br { display: none; }
}
