/*
Theme Name: Mince direct mail
Description: One-page theme for Mince, LLC, converted from the hand-made static site. Business info, hero text, photos and the form recipient are editable in Appearance → Customize → Mince direct mail. Privacy Policy, Terms of Use and Accessibility pages are created on activation; the contact form emails requests with wp_mail().
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tz-landing
*/

/* Mince — postal red, airmail blue, paper; flip postcard, barcode scan, perforated stamps */
:root {
  --red: #c8102e;
  --red-dark: #a00d24;
  --blue: #1d3c8f;
  --paper: #f7f4ee;
  --kraft: #eadfca;
  --ink: #151515;
  --muted: #4d4a45;
  --white: #fff;
  --font: "Inter Tight", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.1875rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--red); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; line-height: 1.04; margin: 0; letter-spacing: -0.03em; }
p { margin: 0; }
figure { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; box-shadow: 0 0 0 6px var(--white); border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--red); color: var(--white); padding: 12px 18px; font-weight: 700; }
.skip:focus { top: 12px; }

.label { font-family: var(--mono); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; display: inline-flex; align-items: center; gap: 10px; }
.label::before { content: ""; width: 26px; height: 14px; background: repeating-linear-gradient(135deg, var(--red) 0 5px, var(--white) 5px 8px, var(--blue) 8px 13px, var(--white) 13px 16px); border: 1px solid rgba(0, 0, 0, 0.1); }
.label--red { color: var(--red); }
.contact .label { color: var(--white); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 26px; border-radius: 6px; font: 800 1.0625rem/1.2 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.2s, background-color 0.2s, color 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn--lg { min-height: 60px; padding: 14px 30px; font-size: 1.125rem; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 238, 0.95); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 50px; height: 50px; flex: none; }
.brand__text { display: flex; flex-direction: column; font-weight: 900; font-size: 1.875rem; line-height: 0.95; letter-spacing: -0.04em; }
.brand__text span { font-family: var(--mono); font-weight: 400; font-size: 0.9375rem; letter-spacing: 0; margin-top: 5px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.0625rem; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover { color: var(--red); text-decoration: underline; }
.nav .btn { margin-left: 10px; }

/* Hero */
.hero { padding: clamp(56px, 7vw, 100px) 0; overflow-x: clip; background-image: radial-gradient(rgba(21, 21, 21, 0.07) 1px, transparent 1px); background-size: 18px 18px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); margin-bottom: 24px; }
.hero h1 span { color: var(--red); display: block; }
.hero__lead { font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); color: var(--muted); max-width: 32em; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.post { display: grid; justify-items: center; gap: 18px; perspective: 1600px; }
.card3d { position: relative; width: min(100%, 520px); aspect-ratio: 1.5; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1); transform: rotate(-3deg); }
.card3d.is-flipped { transform: rotate(2deg) rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.5); }
.face--front { background: repeating-linear-gradient(135deg, var(--red) 0 18px, var(--white) 18px 30px, var(--blue) 30px 48px, var(--white) 48px 60px); padding: 16px; }
.face--front::before { content: ""; position: absolute; inset: 16px; background: var(--red); border-radius: 4px; }
.face__hello { position: relative; margin: 8% 8% 0; color: var(--white); font-weight: 900; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 0.95; letter-spacing: -0.04em; }
.face__sub { position: relative; margin: 12px 8% 0; color: #ffe3e7; font-weight: 600; font-size: 1.0625rem; }
.face__badge { position: absolute; right: 9%; bottom: 13%; font-family: var(--mono); font-weight: 700; font-size: 0.9375rem; color: var(--red); background: var(--white); padding: 6px 12px; border-radius: 999px; transform: rotate(-6deg); }
.face--back { transform: rotateY(180deg); background: var(--white); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: 6% 6% 5%; gap: 0 6%; }
.face--back::before { content: ""; position: absolute; left: 50%; top: 10%; bottom: 26%; width: 2px; background: #e2dccf; }
.back__left { display: flex; flex-direction: column; justify-content: center; }
.back__msg { font-family: var(--mono); font-weight: 700; font-size: clamp(1.0625rem, 2vw, 1.375rem); line-height: 1.35; color: var(--ink); }
.back__from { font-family: var(--mono); font-size: 0.9375rem; color: var(--muted); margin-top: 10px; }
.back__right { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.stamp { display: grid; place-items: center; width: 68px; height: 80px; background: var(--red); color: var(--white); font-weight: 900; font-size: 2rem; border: 4px solid var(--white); outline: 2px dashed #d8d0c0; outline-offset: -2px; }
.postmark { position: absolute; right: 44px; top: 30px; display: grid; justify-items: center; padding: 6px 14px; border: 2px solid rgba(29, 60, 143, 0.75); border-radius: 999px; color: var(--blue); font-family: var(--mono); font-size: 0.9375rem; line-height: 1.25; transform: rotate(-12deg); background: rgba(255, 255, 255, 0.6); }
.postmark b { font-weight: 700; }
.addr { list-style: none; margin: auto 0 0; padding: 0; width: 100%; font-family: var(--mono); font-size: 0.9375rem; color: var(--ink); }
.addr li { border-bottom: 1px solid #d8d0c0; padding: 2px 0; }
.barcode { grid-column: 1 / -1; position: relative; height: 34px; margin-top: 12px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.barcode i { flex: 1 1 0; background: var(--ink); border-radius: 1px; }
.barcode i.t { height: 30%; }
.barcode i.a { height: 65%; align-self: flex-start; margin-top: 3px; }
.barcode i.d { height: 65%; align-self: flex-end; margin-bottom: 3px; }
.barcode i.f { height: 90%; }
.barcode__scan { position: absolute; top: -4px; bottom: -4px; left: 0; width: 4px; background: #ff2d4d; box-shadow: 0 0 14px 4px rgba(255, 45, 77, 0.6); opacity: 0; }
.card3d.is-flipped .barcode__scan { animation: scan 1.6s ease-in-out 0.9s 2 alternate; }
@keyframes scan { from { left: 0; opacity: 1; } to { left: calc(100% - 4px); opacity: 1; } }
.post__flip { min-height: 48px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); font-weight: 800; font-size: 1rem; cursor: pointer; }
.post__flip:hover { background: var(--ink); color: var(--white); }
html:not(.js) .post__flip { display: none; }

/* Heads */
.head { max-width: 760px; margin-bottom: 44px; }
.head h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }

/* Why */
.why { padding: clamp(80px, 9vw, 120px) 0; background: var(--white); border-block: 2px solid var(--ink); }
.why__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); }
.why__card { padding: 30px 28px 34px; }
.why__card + .why__card { border-left: 2px solid var(--ink); }
.why__num { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 0.9375rem; color: var(--white); background: var(--red); padding: 4px 10px; margin-bottom: 18px; }
.why h3 { font-size: 1.875rem; margin-bottom: 10px; }
.why__card p { color: var(--muted); }

/* Stamps */
.stamps { padding: clamp(64px, 8vw, 100px) 0; background: var(--kraft); }
.stamps__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); align-items: center; }
.perf { padding: 10px; background: var(--white); -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at center, #0000 5px, #000 5.5px) -8px -8px / 16px 16px; mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle at center, #0000 5px, #000 5.5px) -8px -8px / 16px 16px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.25)); transform: rotate(-2deg); }
.perf--tilt { transform: rotate(3deg) translateY(-14px); }
.perf img { width: 100%; aspect-ratio: 7 / 8; object-fit: cover; }

/* How */
.how { padding: clamp(80px, 9vw, 120px) 0; }
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.route::before { content: ""; position: absolute; left: 12px; right: 12px; top: 13px; border-top: 3px dashed var(--red); }
.route li { position: relative; padding-top: 44px; }
.route__stop { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 4px solid var(--red); }
.route li:last-child .route__stop { background: var(--red); }
.route h3 { font-size: 1.5rem; margin-bottom: 6px; }
.route p { color: var(--muted); font-size: 1.0625rem; }

/* FAQ */
.faq { padding: 0 0 clamp(80px, 9vw, 120px); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq__list details { border-bottom: 2px solid var(--ink); }
.faq__list details:first-child { border-top: 2px solid var(--ink); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-weight: 800; font-size: 1.25rem; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; flex: none; font-family: var(--mono); font-weight: 700; font-size: 1.5rem; color: var(--red); transition: transform 0.25s; }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { padding: 0 40px 20px 0; color: var(--muted); }

/* Contact */
.contact { background: var(--red); color: var(--white); padding: clamp(80px, 9vw, 120px) 0; }
.contact .label::before { border-color: rgba(255, 255, 255, 0.6); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); margin-bottom: 14px; }
.contact__info > p:not(.label) { color: #ffe3e7; margin-bottom: 26px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li { display: grid; gap: 2px; }
.contact__list span { font-family: var(--mono); font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; color: var(--white); opacity: 0.95; }
.contact__list a { color: var(--white); font-weight: 700; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.contact__list address { font-style: normal; }
.form { background: var(--paper); color: var(--ink); border-radius: 10px; padding: clamp(22px, 4vw, 36px); display: grid; gap: 16px; box-shadow: 10px 10px 0 var(--ink); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 1rem; }
.opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; min-height: 54px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink); font: 400 1.125rem/1.4 var(--font); }
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form__status { font-size: 1.0625rem; min-height: 1.5em; }
.form[data-state="success"] .form__status { color: #146c2e; font-weight: 700; }
.form[data-state="error"] .form__status { color: var(--red-dark); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { background: var(--ink); color: #d4d0c8; padding: 44px 0 24px; font-size: 1.0625rem; }
.footer a { color: var(--white); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid #333; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; font-size: 0.9375rem; color: #aaa59b; }

.mobile-bar { display: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .perf.reveal.in { transform: rotate(-2deg); }
.js .perf--tilt.reveal.in { transform: rotate(3deg) translateY(-14px); }

@media (max-width: 1000px) {
  .nav a:not(.btn) { display: none; }
  .hero__grid, .faq__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .route { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .route::before { display: none; }
}

@media (max-width: 767px) {
  .header__inner { min-height: 68px; }
  .brand__mark { width: 44px; height: 44px; }
  .brand__text { font-size: 1.5rem; }
  .nav .btn { display: none; }
  .face--back { grid-template-columns: 1.1fr 0.9fr; padding: 6% 5% 5%; }
  .addr { display: none; }
  .stamp { width: 56px; height: 66px; font-size: 1.625rem; }
  .postmark { right: 30px; top: 70px; padding: 4px 10px; }
  .why__grid { grid-template-columns: minmax(0, 1fr); }
  .why__card + .why__card { border-left: 0; border-top: 2px solid var(--ink); }
  .stamps__row { grid-template-columns: minmax(0, 1fr); max-width: 360px; }
  .perf--tilt, .js .perf--tilt.reveal.in { transform: rotate(2deg); }
  .route { grid-template-columns: minmax(0, 1fr); }
  .form { box-shadow: 6px 6px 0 var(--ink); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .form .btn { justify-self: stretch; }
  .footer__bottom { flex-direction: column; }
  body { padding-bottom: 84px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 2px solid var(--ink); }
  .mobile-bar .btn { min-height: 54px; padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Legal links & form consent */
.legal-links { line-height: 2; }
.legal-links a { white-space: nowrap; }
.form-legal { margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.form-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Optional-field labels: keep "(optional)" on the label line so inputs in a row line up */
.form label:has(> .opt) { grid-template-columns: max-content minmax(0, 1fr); column-gap: 6px; align-items: baseline; }
.form label:has(> .opt) > :is(input, select, textarea) { grid-column: 1 / -1; }

/* ---------- WordPress additions ---------- */

/* Colours and type for WordPress pages (same as the site's legal pages) */
:root {
  --lg-bg: #f7f4ee;
  --lg-surface: #efece6;
  --lg-ink: #151515;
  --lg-muted: #595856;
  --lg-head: #920c21;
  --lg-accent: #c8102e;
  --lg-line: #ceccc7;
  --lg-display: "Inter Tight", system-ui, sans-serif;
  --lg-body: "Inter Tight", system-ui, sans-serif;
}

/* Sticky header below the admin bar for signed-in users */
.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar .header { top: 0; } }

/* WordPress core helpers */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip: auto !important; clip-path: none; color: #111; display: block; height: auto; left: 8px; padding: 12px 18px; top: 8px; width: auto; z-index: 100000; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }

/* Pages: Privacy Policy, Terms of Use, Accessibility Statement and any other page */
.page-doc { background: var(--lg-bg); color: var(--lg-ink); font-family: var(--lg-body); }
.page-doc__wrap { width: min(100% - 32px, 880px); margin-inline: auto; padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page-doc .page-doc__title { font-family: var(--lg-display); font-weight: 400; color: var(--lg-head); font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: normal; text-transform: none; margin: 0 0 14px; }
.page-doc__content { font-size: 1.1875rem; line-height: 1.7; }
.page-doc .page-doc__content h2 { font-family: var(--lg-display); font-weight: 400; color: var(--lg-head); font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; letter-spacing: normal; text-transform: none; margin: 2.2em 0 0.5em; }
.page-doc .page-doc__content h3 { font-family: var(--lg-body); font-weight: 700; color: var(--lg-ink); font-size: 1.1875rem; line-height: 1.3; letter-spacing: normal; text-transform: none; margin: 1.4em 0 0.3em; }
.page-doc .page-doc__content p, .page-doc .page-doc__content ul, .page-doc .page-doc__content ol { margin: 0 0 1em; max-width: 70ch; }
.page-doc .page-doc__content ul, .page-doc .page-doc__content ol { padding-left: 1.3em; list-style: revert; }
.page-doc .page-doc__content li { margin-bottom: 0.4em; }
.page-doc a { color: var(--lg-accent); overflow-wrap: anywhere; text-underline-offset: 3px; }
.page-doc .page-doc__content img { height: auto; }
.page-doc .page-date { color: var(--lg-muted); font-size: 1rem; }
.page-doc .page-contact { font-style: normal; padding: 18px 22px; border-left: 4px solid var(--lg-accent); background: var(--lg-surface); max-width: 70ch; margin: 0 0 1em; }
.page-doc .page-doc__back { margin-top: 40px; font-weight: 700; }
.page-doc .page-doc__back a { display: inline-flex; align-items: center; min-height: 44px; }
.page-doc .page-doc__item { padding: 22px 0; border-bottom: 1px solid var(--lg-line); }
.page-doc .page-doc__item h2 { font-family: var(--lg-display); font-weight: 400; font-size: 2rem; margin: 0 0 8px; }
.page-doc .page-doc__item h2 a { color: var(--lg-head); text-decoration: none; }
.page-doc .nav-links { display: flex; gap: 10px; margin-top: 28px; }
.page-doc .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 2px solid var(--lg-ink); color: var(--lg-ink); text-decoration: none; font-weight: 700; }
.page-doc .page-numbers.current { background: var(--lg-ink); color: var(--lg-bg); }
