/*
Theme Name:   Stphnwlkr Letterpress
Theme URI:    https://stphnwlkr.com
Description:  Twenty Twenty-Three child theme. Vintage direct-response sales-letter aesthetic — typewriter body, tabloid headlines, rubber-stamp red, clip-out coupon details. Every page looks like it rolled out of a 1970s ad man's typewriter.
Author:       Stephen Walker
Template:     twentytwentythree
Version:      1.1.0
Requires at least: 6.1
Tested up to: 6.8
Requires PHP: 7.4
Text Domain:  stphnwlkr-letterpress
*/

/* ==========================================================
   THE LETTER CHROME
   theme.json handles colours, fonts and element styles.
   This file handles the things theme.json can't:
   the paper card, hard shadows, dashed rules, stamp buttons.
   ========================================================== */

/* --- The whole site sits on a desk; content is the letter --- */
body {
  background: #e7e0cf; /* paper-edge / the desk */
}

.wp-site-blocks {
  background: #f4efe3; /* the paper */
  max-width: 840px;
  margin: 32px auto 64px;
  padding: 24px 32px 48px;
  border: 1px solid rgba(27, 23, 19, 0.25);
  box-shadow: 0 2px 0 rgba(27, 23, 19, 0.12),
              0 18px 40px rgba(27, 23, 19, 0.14);
}

@media (max-width: 880px) {
  .wp-site-blocks {
    margin: 16px 12px 40px;
    padding: 16px 18px 36px;
  }
}

/* --- Headings: tabloid, tight — but post titles keep their own case --- */
h1, h2, h3 {
  letter-spacing: -0.01em;
  line-height: 1.06;
}

h1:not(.wp-block-post-title),
.wp-block-site-title {
  text-transform: uppercase;
}

/* Post titles in lists/grids: scaled to fit their column,
   no mid-word amputations */
.wp-block-query .wp-block-post-title {
  font-size: clamp(20px, 2.2vw, 26px);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.wp-block-query .wp-block-post-title a {
  text-decoration: none;
}

.wp-block-query .wp-block-post-title a:hover {
  color: #c0301c;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Excerpts in grids: slightly smaller so columns breathe */
.wp-block-query .wp-block-post-excerpt {
  font-size: 15px;
}

/* --- Site header reads as a letterhead masthead --- */
header.wp-block-template-part .wp-block-group:first-child,
.wp-block-template-part header {
  border-bottom: 3px solid #1b1713;
}

.wp-block-site-title a {
  text-decoration: none;
  letter-spacing: 0.1em;
}

/* --- Navigation: small caps, typewriter --- */
.wp-block-navigation a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.wp-block-navigation a:hover {
  color: #c0301c;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Links: honest underlines, red on hover --- */
.wp-site-blocks a {
  text-underline-offset: 3px;
}

.wp-site-blocks p a:hover,
.wp-site-blocks li a:hover {
  color: #c0301c;
}

/* --- Buttons: the rubber-stamp slab --- */
.wp-block-button__link,
.wp-element-button,
button[type="submit"]:not(.sw-submit),
input[type="submit"] {
  font-family: 'Archivo Black', Impact, sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2.5px solid #1b1713 !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 #1b1713;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
input[type="submit"]:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #1b1713;
}

.wp-block-button__link:active,
.wp-element-button:active,
input[type="submit"]:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #1b1713;
}

/* --- Separators: the clip-out dashed line --- */
hr.wp-block-separator {
  border: none;
  border-top: 2.5px dashed #1b1713;
  opacity: 1;
  position: relative;
  overflow: visible;
}

hr.wp-block-separator::before {
  content: "✂";
  position: absolute;
  top: -14px;
  left: 24px;
  background: #f4efe3;
  padding: 0 8px;
  font-size: 18px;
  line-height: 1;
  color: #1b1713;
}

/* --- Blockquotes: red-pen margin notes --- */
blockquote.wp-block-quote {
  border-left: 4px solid #c0301c;
  padding-left: 20px;
  font-style: italic;
}

blockquote.wp-block-quote cite {
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Pullquotes: stamped boxes --- */
.wp-block-pullquote {
  border: 2.5px dashed #1b1713;
  background: rgba(255, 255, 255, 0.35);
  padding: 28px;
}

/* --- Post meta / dates: filing-cabinet small print --- */
.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3d362e;
}

/* --- Code blocks: it's all typewriter anyway, mark them with paper-tape --- */
pre.wp-block-code {
  background: #fffdf6;
  border: 2.5px solid #1b1713;
  border-radius: 0;
  padding: 20px;
}

/* --- Forms (search, comments): match the coupon inputs --- */
.wp-site-blocks input[type="text"],
.wp-site-blocks input[type="email"],
.wp-site-blocks input[type="search"],
.wp-site-blocks input[type="url"],
.wp-site-blocks textarea {
  font-family: 'Courier Prime', Courier, monospace;
  border: 2.5px solid #1b1713;
  border-radius: 0;
  background: #fffdf6;
  color: #1b1713;
  padding: 10px 12px;
}

.wp-site-blocks input:focus-visible,
.wp-site-blocks textarea:focus-visible,
.wp-site-blocks button:focus-visible,
.wp-site-blocks a:focus-visible {
  outline: 3px solid #c0301c;
  outline-offset: 2px;
}

/* --- Tables: ledger style --- */
.wp-block-table table {
  border-collapse: collapse;
}

.wp-block-table th {
  font-family: 'Archivo Black', Impact, sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  border-bottom: 3px solid #1b1713;
}

.wp-block-table td {
  border-bottom: 1.5px solid rgba(27, 23, 19, 0.3);
}

/* --- The famous opt-in link: stamp red, can't-miss-it --- */
.sw-optin-link a {
  color: #c0301c;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.sw-optin-link a:hover {
  color: #1b1713;
  background: rgba(192, 48, 28, 0.08);
}

/* --- Footer: the small print --- */
footer.wp-block-template-part,
.wp-block-template-part footer {
  border-top: 1.5px solid #1b1713;
  font-size: 13px;
}

/* --- Reduced motion: kill the button physics --- */
@media (prefers-reduced-motion: reduce) {
  .wp-block-button__link,
  .wp-element-button,
  input[type="submit"] {
    transition: none;
  }
}
