/*
Theme Name: 51 Cents Well Spent — Penny Arcade
Theme URI: https://51centswellspent.com
Author: 51 Cents Well Spent
Description: A carnival-inspired travel blog theme for pressed penny collectors. Marquee ticker, interactive penny press hero, and tilted postcard cards.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fifty-one-cents
Tags: blog, travel, custom-logo, featured-images
*/

:root {
  --teal: #0F4C52; --teal-deep: #0A363B;
  --red: #D8402B; --red-deep: #A92E1D;
  --cream: #FDF3DC; --cream-shadow: #E8D9B8;
  --copper: #C67B3B; --copper-hi: #E8A968; --copper-deep: #8C5320;
  --ink: #241D14;
  --font-display: 'Rye', serif;
  --font-body: 'Karla', sans-serif;
  --font-hand: 'Caveat', cursive;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  font-family: var(--font-body); font-size: 1.05rem; line-height: 1.65; color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(253,243,220,0.07) 1px, transparent 0) 0 0 / 22px 22px,
    var(--teal);
}
img { max-width: 100%; height: auto; display: block; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--copper-hi); outline-offset: 3px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ticker */
.ticker { background: var(--red); color: var(--cream); overflow: hidden; border-bottom: 3px solid var(--ink); }
.ticker-track { display: flex; width: max-content; animation: tick 22s linear infinite; }
.ticker span { font-family: var(--font-display); font-size: .85rem; letter-spacing: .18em; padding: .45rem 1.2rem; white-space: nowrap; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Header */
.site-header { background: var(--cream); border-bottom: 4px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-title { font-family: var(--font-display); font-size: 1.6rem; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-title .flip { display: inline-block; color: var(--red); transform: rotate(-6deg); }
.main-nav ul { display: flex; gap: .6rem; list-style: none; flex-wrap: wrap; }
.main-nav a {
  font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
  padding: .35rem 1rem; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; display: inline-block;
}
.main-nav a:hover, .main-nav .current-menu-item a { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); background: var(--copper-hi); }

/* Hero press */
.hero { text-align: center; padding: 4rem 1.25rem 5rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 400; color: var(--cream);
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.05;
  text-shadow: 4px 4px 0 var(--red-deep), 8px 8px 0 rgba(0,0,0,.35);
  transform: rotate(-2deg); margin-bottom: .5rem;
}
.hero h1 .price { color: var(--copper-hi); }
.hero .handnote { font-family: var(--font-hand); font-size: 1.6rem; color: var(--copper-hi); transform: rotate(-1deg); display: inline-block; margin: .5rem 0 2.5rem; }
.press { display: inline-flex; flex-direction: column; align-items: center; }
.press-window {
  width: 300px; height: 170px; background: var(--teal-deep);
  border: 4px solid var(--copper); border-radius: 14px;
  box-shadow: 0 0 0 4px var(--ink), inset 0 6px 18px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.coin {
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--copper-hi), var(--copper) 55%, var(--copper-deep));
  border: 3px solid var(--copper-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--cream); font-size: 1.15rem;
  text-shadow: 0 1px 0 var(--copper-deep);
  transition: width .9s cubic-bezier(.7,-0.2,.3,1.3), height .9s cubic-bezier(.7,-0.2,.3,1.3), border-radius .9s;
}
.press.pressed .coin { width: 230px; height: 118px; border-radius: 50% / 60%; }
.coin .after { display: none; }
.press.pressed .coin .before { display: none; }
.press.pressed .coin .after { display: block; text-align: center; line-height: 1.2; animation: stampin .5s .5s both; }
@keyframes stampin { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: scale(1); } }
.crank-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.crank-btn {
  font-family: var(--font-display); font-size: 1rem; letter-spacing: .08em; cursor: pointer;
  color: var(--ink); background: var(--copper-hi); border: 3px solid var(--ink); border-radius: 12px;
  padding: .7rem 1.4rem; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.crank-btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.crank-btn:active { transform: translate(4px,4px); box-shadow: 0 0 0 var(--ink); }
.gear { width: 54px; height: 54px; border-radius: 50%; background: repeating-conic-gradient(var(--copper) 0 20deg, var(--copper-deep) 20deg 40deg); border: 3px solid var(--ink); transition: transform 1s cubic-bezier(.5,0,.3,1); }
.press.pressed .gear { transform: rotate(720deg); }
.press-caption { font-family: var(--font-hand); font-size: 1.25rem; color: var(--cream); margin-top: .9rem; opacity: .85; }

/* Postcards */
.board { padding: 1rem 0 5rem; position: relative; }
.board-title { font-family: var(--font-display); font-weight: 400; color: var(--cream); text-align: center; font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 3rem; text-shadow: 3px 3px 0 var(--red-deep); transform: rotate(-1deg); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 3rem 2.25rem; list-style: none; }
.postcard { background: var(--cream); border: 3px solid var(--ink); border-radius: 6px; padding: 1.1rem 1.1rem 1.3rem; position: relative; box-shadow: 6px 8px 0 rgba(0,0,0,.35); transition: transform .2s ease; }
.postcard:nth-child(3n+1) { transform: rotate(-2.4deg); }
.postcard:nth-child(3n+2) { transform: rotate(1.8deg); }
.postcard:nth-child(3n)   { transform: rotate(-1.2deg); }
.postcard:hover { transform: rotate(0deg) translateY(-6px); z-index: 2; }
.tape { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-3deg); width: 110px; height: 28px; background: rgba(232,169,104,.75); border-left: 2px dashed rgba(36,29,20,.3); border-right: 2px dashed rgba(36,29,20,.3); }
.stamp { position: absolute; top: .8rem; right: .8rem; width: 56px; height: 66px; background: var(--red); color: var(--cream); font-family: var(--font-display); font-size: .95rem; display: flex; align-items: center; justify-content: center; transform: rotate(6deg); z-index: 1;
  clip-path: polygon(0 4%,4% 0,8% 4%,12% 0,17% 4%,21% 0,25% 4%,29% 0,33% 4%,38% 0,42% 4%,46% 0,50% 4%,54% 0,58% 4%,62% 0,67% 4%,71% 0,75% 4%,79% 0,83% 4%,88% 0,92% 4%,96% 0,100% 4%,100% 96%,96% 100%,92% 96%,88% 100%,83% 96%,79% 100%,75% 96%,71% 100%,67% 96%,62% 100%,58% 96%,54% 100%,50% 96%,46% 100%,42% 96%,38% 100%,33% 96%,29% 100%,25% 96%,21% 100%,17% 96%,12% 100%,8% 96%,4% 100%,0 96%); }
.photo { height: 150px; border: 2px solid var(--ink); border-radius: 4px; margin-bottom: 1rem; overflow: hidden; background: linear-gradient(160deg, var(--copper-hi), var(--red-deep) 75%); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); color: var(--cream); font-size: 1.3rem; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.postcard h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.25; margin-bottom: .4rem; }
.postcard h3 a { color: var(--ink); text-decoration: none; }
.postcard h3 a:hover { color: var(--red); }
.minted { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); background: var(--teal); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .5rem; }
.postcard .blurb { font-size: .93rem; }
.postcard .blurb p { display: inline; }
.postcard .go { font-family: var(--font-hand); font-size: 1.25rem; color: var(--red); text-decoration: none; display: inline-block; margin-top: .5rem; }
.postcard .go:hover { text-decoration: underline; }
.board::before { content: ""; position: absolute; inset: 8rem 6% 4rem; border: 3px dashed rgba(253,243,220,.22); border-radius: 40% 55% 50% 45%; pointer-events: none; }

/* Single post & pages: an oversized postcard */
.entry { padding: 3.5rem 0 4.5rem; }
.entry-card { background: var(--cream); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 8px 10px 0 rgba(0,0,0,.35); max-width: 780px; margin: 0 auto; padding: 2.25rem clamp(1.25rem, 4vw, 3rem) 3rem; position: relative; }
.entry-card .stamp { top: 1.1rem; right: 1.1rem; }
.entry-header { text-align: center; margin-bottom: 2rem; }
.entry-header h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; margin-bottom: .75rem; }
.entry-thumb { border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; margin: 0 auto 1.5rem; max-width: 560px; }
.entry-content > * + * { margin-top: 1.2rem; }
.entry-content h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin-top: 2rem; }
.entry-content h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; margin-top: 1.6rem; }
.entry-content a { color: var(--red-deep); }
.entry-content blockquote { border-left: 4px solid var(--copper); padding-left: 1.1rem; font-family: var(--font-hand); font-size: 1.35rem; color: var(--teal-deep); }
.entry-content img { border: 2px solid var(--ink); border-radius: 4px; }

/* Pagination & footer */
.pagination { text-align: center; margin-top: 3rem; }
.pagination .nav-links { display: inline-flex; gap: .5rem; }
.pagination a, .pagination span.current { font-weight: 700; font-size: .85rem; padding: .4rem .9rem; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--cream); box-shadow: 3px 3px 0 var(--ink); }
.pagination span.current { background: var(--copper-hi); }
.site-footer { background: var(--ink); color: var(--cream); text-align: center; padding: 2rem 1.25rem; border-top: 4px solid var(--copper); }
.site-footer p { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer .price { color: var(--copper-hi); font-family: var(--font-display); }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; }
  .board::before { display: none; }
}
