/* ============================================================
   TYPOGRAPHY — PETER LAURA FLOORING
   Place this file in the same folder as index.html.
   Link it inside <head>:
   <link rel="stylesheet" href="typography.css"/>
   ============================================================ */

/* ── FONT SMOOTHING ──────────────────────────────────────────
   'auto' uses subpixel rendering, giving Inter its correct
   weight rather than the artificially thinned antialiased look. */
body {
  -webkit-font-smoothing: auto;
}


/* ── FONT — Inter (variable, self-hosted) ───────────────────
   Two unicode-range subsets so the right file loads per glyph.
   Single variable font handles all weights 100–900.            */
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ── IMAGE ALT TEXT SUPPRESSION ──────────────────────────────
   Hide alt text and broken-image icons during loading or if an
   image fails. The alt attribute still works for screen readers,
   SEO, and accessibility — only the visible rendering of the
   text inside the image box is suppressed.                     */
img {
  color: transparent;
  font-size: 0;
}


/* ── WIDOW & ORPHAN CONTROL ──────────────────────────────────
   widows:  minimum lines allowed at the TOP of a new column
   orphans: minimum lines allowed at the BOTTOM of a column
   Both set to 3 = no single or double stray lines.            */
p, li, blockquote, dd {
  widows: 3;
  orphans: 3;
}


/* ── BALANCED LINE LENGTHS ────────────────────────────────────
   text-wrap: balance distributes text more evenly across lines,
   reducing widows in short text blocks like the footer columns.
   Supported in Chrome 114+, Safari 17.4+, Firefox 121+.        */
p, .col-prose p, .fl {
  text-wrap: balance;
}


/* ── HYPHENS — disabled ──────────────────────────────────────
   Words always wrap whole; never broken across lines with a
   hyphen. overflow-wrap kept as a safety net for unbreakable
   strings (URLs, etc.) that exceed the column width.           */
p, .col-prose p, .fl {
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: break-word;
}


/* ── INLINE LINKS — no break at end of line ──────────────────
   Targets only inline text links (inside paragraphs and the
   footer), not block-level brand or button elements.            */
p a, .fl a {
  white-space: nowrap;
}
strong, em {
  white-space: nowrap;
}


/* ── PHONE NUMBER & NUMERIC SPANS — slight letter-spacing ────
   Numeric content reads tight by default. Letter-spacing relaxes
   the digits and improves legibility. Numeric content is wrapped
   in <span class="num"> (e.g. "2002", "212", "37620") so adjacent
   word text keeps its default spacing.                          */
.fl a[href^="tel:"],
.num {
  letter-spacing: 0.06em;
}


/* ── NAV — Bold weight (700) ─────────────────────────────────
   The "Peter Laura Flooring" top nav button.                    */
.snbtn {
  font-weight: 700;
}


/* ── FOOTER & CONTENT ALIGNMENT — tablet zone (769–1024px) ──
   The grids get crushed in this range. Restructure to 2 columns:
   headline on the left, paragraphs stacked on the right.
   Footer reflows similarly.                                    */
@media (max-width: 1024px) and (min-width: 769px) {
  .content-grid,
  footer {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px 60px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  /* Content grid: headline col 1 (spans both rows), paragraphs stacked col 2 */
  .content-grid .headline-block { grid-column: 1; grid-row: 1 / span 2; }
  .content-grid .col-prose:not(.col-prose-right) { grid-column: 2; grid-row: 1; max-width: 100% !important; }
  .content-grid .col-prose-right { grid-column: 2; grid-row: 2; max-width: 100% !important; }

  /* Footer: studio + phone on left; paragraph + location on right */
  footer .fl:nth-child(1) { grid-column: 1; grid-row: 1; }
  footer .fl:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; max-width: 520px; }
  footer .fl:nth-child(3) { grid-column: 1; grid-row: 2; }
  footer .fl:nth-child(4) { grid-column: 1; grid-row: 3; }
}
