/*
Theme Name: Osmica Retro Moto
Theme URI: https://osmica.org
Author: Mario
Author URI: https://osmica.org
Description: Otkacena retro motoristicka tema. Patchevi, chrome, checker flag i benzinski miris nostalgije.
Version: 1.0.0
Requires at least: 6.0
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: osmica-retro-moto
*/

/* -------------------------------------------------- */
/* 1. Reset & base                                     */
/* -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --cream: #f2e6cc;
  --paper: #ece0c5;
  --asphalt: #201c1a;
  --asphalt-2: #2c2724;
  --rust: #c1440e;
  --mustard: #e0a458;
  --oxblood: #7a2323;
  --chrome: #d8d2c4;
  --ink: #322b24;

  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-mono: 'Special Elite', 'Courier New', monospace;
  --font-body: 'Oswald', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(50,43,36,0.03) 0px, rgba(50,43,36,0.03) 1px, transparent 1px, transparent 3px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: .04em; margin: 0 0 .5rem; }

p { margin: 0 0 1rem; }

ul { padding: 0; }

/* Film-grain overlay across the whole site */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* -------------------------------------------------- */
/* 2. Road-stripe divider                              */
/* -------------------------------------------------- */
.road-strip {
  height: 22px;
  background-color: var(--asphalt);
  background-image: repeating-linear-gradient(
    90deg,
    var(--mustard) 0, var(--mustard) 34px,
    transparent 34px, transparent 58px
  );
}

/* -------------------------------------------------- */
/* 3. Header                                           */
/* -------------------------------------------------- */
.site-header {
  background: var(--asphalt);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 0 var(--rust);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.patch-logo { text-decoration: none; display: inline-flex; }

.patch-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 30% 28%, var(--mustard), var(--rust) 72%);
  border: 3px dashed var(--cream);
  box-shadow: 0 0 0 4px var(--asphalt), 0 4px 8px rgba(0,0,0,.45);
  transform: rotate(-7deg);
  transition: transform .3s ease;
  flex: 0 0 auto;
}
.patch-logo:hover .patch-ring { transform: rotate(0deg) scale(1.06); }

.patch-text-top, .patch-text-bottom {
  font-family: var(--font-mono);
  font-size: .42rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--asphalt);
  line-height: 1.2;
}
.patch-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--asphalt);
  line-height: 1;
  letter-spacing: .03em;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.menu-toggle span { width: 26px; height: 3px; background: var(--cream); border-radius: 2px; }

.primary-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }

.nav-list { display: flex; gap: 2rem; list-style: none; margin: 0; }
.nav-list a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .07em;
  text-decoration: none;
  color: var(--cream);
  position: relative;
  padding-bottom: 4px;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 3px;
  background: var(--rust);
  transition: width .25s ease;
}
.nav-list a:hover::after,
.nav-list a:focus::after,
.nav-list li.current-menu-item a::after { width: 100%; }

/* -------------------------------------------------- */
/* 4. Hero                                             */
/* -------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 7rem 1.5rem 5.5rem;
  color: var(--cream);
  background-color: var(--asphalt);
  background-image:
    linear-gradient(180deg, rgba(32,28,26,.55) 0%, rgba(32,28,26,.55) 55%, rgba(193,68,14,.55) 160%),
    var(--hero-image);
  background-size: cover;
  background-position: center 60%;
}
.hero-kicker {
  font-family: var(--font-mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--mustard);
  margin-bottom: .5rem;
}
.hero-title {
  font-size: clamp(3.2rem, 12vw, 8rem);
  margin: 0;
  color: var(--cream);
  text-shadow: 4px 4px 0 var(--rust), 8px 8px 0 rgba(0,0,0,.35);
}
.hero-tagline {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 1rem auto 2rem;
  color: var(--chrome);
}
.hero-ribbon {
  position: absolute;
  top: 2.2rem;
  right: -4rem;
  background: var(--rust);
  color: var(--cream);
  font-family: var(--font-display);
  letter-spacing: .1em;
  padding: .4rem 4rem;
  transform: rotate(35deg);
  box-shadow: 0 3px 0 rgba(0,0,0,.4);
  font-size: .8rem;
  white-space: nowrap;
}

/* -------------------------------------------------- */
/* 5. Buttons                                          */
/* -------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .9rem 2.2rem;
  border: 3px solid var(--asphalt);
  background: var(--mustard);
  color: var(--asphalt);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--asphalt);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--asphalt); }

/* -------------------------------------------------- */
/* 6. Section title                                    */
/* -------------------------------------------------- */
.section-title {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--rust);
  margin: .6rem auto 0;
}

/* -------------------------------------------------- */
/* 7. Garage grid / patch cards                        */
/* -------------------------------------------------- */
.garage-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.75rem;
}
.patch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  padding: 2.25rem 1.25rem;
  background: var(--paper);
  border: 3px dashed var(--ink);
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 6px 6px 0 rgba(32,28,26,.15);
  transition: transform .2s ease, box-shadow .2s ease;
}
.patch-card.rotate-l { transform: rotate(-3deg); }
.patch-card.rotate-r { transform: rotate(3deg); }
.patch-card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 10px 10px 0 var(--rust); }
.patch-card-icon { font-size: 2.75rem; }
.patch-card-title { font-family: var(--font-display); font-size: 1.5rem; }
.patch-card-desc { font-size: .9rem; color: #4a4038; }

/* -------------------------------------------------- */
/* 7b. Stat strip                                      */
/* -------------------------------------------------- */
.stat-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.stat-tile {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 10px;
  color: var(--cream);
  box-shadow: 5px 5px 0 rgba(32,28,26,.2);
}
.stat-tile.stat-rust { background: var(--rust); }
.stat-tile.stat-oxblood { background: var(--oxblood); }
.stat-tile.stat-asphalt { background: var(--asphalt); }
.stat-tile.stat-mustard { background: var(--mustard); color: var(--asphalt); }
.stat-number { font-size: 3rem; margin: 0; }
.stat-caption { font-size: .9rem; margin: 0; text-transform: uppercase; letter-spacing: .03em; }

/* -------------------------------------------------- */
/* 7c. Bike gallery                                    */
/* -------------------------------------------------- */
.bike-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}
.bike-card {
  background: var(--paper);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(32,28,26,.15);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bike-card:nth-child(even) { transform: rotate(1.5deg); }
.bike-card:nth-child(odd) { transform: rotate(-1.5deg); }
.bike-card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 10px 10px 0 var(--rust); }
.bike-card { cursor: pointer; }
.bike-card:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.bike-card .bike-photo { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.bike-card .bike-photo img { width: 100%; height: 100%; object-fit: cover; }
.bike-card .bike-photo::after {
  content: "i";
  position: absolute;
  right: .6rem; bottom: .6rem;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(32,28,26,.75);
  color: var(--cream);
  font-family: var(--font-display);
  font-style: italic;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.bike-card h3 {
  text-align: center;
  padding: 1rem .75rem;
  margin: 0;
  font-size: 1.35rem;
  border-top: 3px dashed var(--ink);
}

/* -------------------------------------------------- */
/* 7d. Bike spec modal                                 */
/* -------------------------------------------------- */
.bike-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20,17,15,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.bike-modal-overlay[hidden] { display: none; }
.bike-modal {
  background: var(--paper);
  color: var(--ink);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
  border: 3px solid var(--asphalt);
  box-shadow: 10px 10px 0 var(--rust);
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bike-modal { grid-template-columns: 1fr 1fr; }
}
.bike-modal-close {
  position: absolute;
  top: .5rem; right: .5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--asphalt);
  color: var(--cream);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.bike-modal-close:hover { background: var(--rust); }
.bike-modal-photo { aspect-ratio: 4/3; overflow: hidden; background: var(--asphalt); }
.bike-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.bike-modal-body { padding: 1.75rem 1.5rem; }
.bike-modal-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .75rem;
  color: var(--rust);
  margin: 0 0 .25rem;
}
.bike-modal-body h3 { font-size: 1.7rem; margin-bottom: 1rem; }
.bike-modal-specs { margin: 0; }
.bike-modal-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed rgba(50,43,36,.3);
  font-size: .95rem;
}
.bike-modal-specs > div:last-child { border-bottom: none; }
.bike-modal-specs dt { font-family: var(--font-mono); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; color: #6b5f52; }
.bike-modal-specs dd { margin: 0; text-align: right; font-weight: 600; }

/* -------------------------------------------------- */
/* 8. Ride / post cards                                */
/* -------------------------------------------------- */
.latest-rides { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.ride-card {
  background: var(--paper);
  border: 1px solid rgba(50,43,36,.15);
  border-radius: 6px;
  overflow: visible;
  box-shadow: 5px 5px 0 rgba(32,28,26,.1);
}
.ride-card .ride-thumb {
  display: block;
  width: 82%;
  margin: 1.5rem auto 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  border: 6px solid var(--cream);
  outline: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(32,28,26,.3);
  transform: rotate(-2.5deg);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ride-card:hover .ride-thumb {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 7px 7px 0 var(--rust);
}
.ride-card .ride-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ride-card h2, .ride-card h3 { padding: 1rem 1.25rem 0; font-size: 1.4rem; }
.ride-card h2 a, .ride-card h3 a { text-decoration: none; }
.ride-card h2 a:hover, .ride-card h3 a:hover { color: var(--rust); }
.ride-card p { padding: 0 1.25rem 1.25rem; font-size: .95rem; color: #4a4038; }
.empty-note { text-align: center; font-family: var(--font-mono); color: #6b5f52; }

/* -------------------------------------------------- */
/* 8b. Video thumbnail grid                            */
/* -------------------------------------------------- */
.video-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.video-thumb {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(50,43,36,.15);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 5px 5px 0 rgba(32,28,26,.1);
  transition: transform .2s ease, box-shadow .2s ease;
}
.video-thumb:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--rust); }
.video-thumb:hover .video-thumb-play { background: var(--rust); }
.video-thumb-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--asphalt); }
.video-thumb-media img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(32,28,26,.75);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  padding-left: .15rem;
  transition: background .2s ease;
}
.video-thumb-duration {
  position: absolute;
  right: .5rem; bottom: .5rem;
  background: rgba(32,28,26,.85);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: .1rem .4rem;
  border-radius: 3px;
}
.video-thumb-title {
  padding: .75rem 1rem;
  font-size: .92rem;
  line-height: 1.35;
  flex: 1;
}

/* -------------------------------------------------- */
/* 9. Generic content / page / single                  */
/* -------------------------------------------------- */
.content-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.page-content .entry-content,
.single-content .entry-content { font-size: 1.05rem; }
.entry-content h2 { font-size: 1.8rem; margin-top: 2rem; }
.entry-content a { color: var(--rust); }
.entry-meta {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: #6b5f52;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1.5rem;
}

.pagination-nav { display: flex; justify-content: space-between; margin-top: 2.5rem; font-family: var(--font-display); }
.pagination-nav a { text-decoration: none; }
.pagination-nav a:hover { color: var(--rust); }

/* -------------------------------------------------- */
/* 10. 404                                             */
/* -------------------------------------------------- */
.error-404 {
  text-align: center;
  padding: 6rem 1.5rem;
}
.error-404 .hero-title { color: var(--ink); text-shadow: 4px 4px 0 var(--mustard); }

/* -------------------------------------------------- */
/* 11. Footer                                          */
/* -------------------------------------------------- */
.site-footer {
  background: var(--asphalt);
  color: var(--chrome);
  background-image:
    radial-gradient(circle at 15% 30%, rgba(0,0,0,.4), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.35), transparent 35%);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-col h3 { color: var(--mustard); font-size: 1.3rem; }
.footer-col p { color: var(--chrome); font-size: .95rem; }
.footer-widget-title { color: var(--mustard); font-family: var(--font-display); font-size: 1.2rem; }
.footer-bottom {
  text-align: center;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* -------------------------------------------------- */
/* 12. Responsive                                      */
/* -------------------------------------------------- */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--asphalt);
    flex-direction: column;
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    justify-content: flex-start;
    transition: max-height .25s ease, padding .25s ease;
  }
  .primary-nav.open { max-height: 400px; padding: 1rem 1.5rem 1.5rem; }
  .nav-list { flex-direction: column; gap: 1rem; }
  .hero-ribbon { font-size: .7rem; right: -4.5rem; top: 1.2rem; }
}
