/*
Theme Name: Rolling Dice Solutions
Theme URI: https://example.com
Author: Rolling Dice Solutions
Author URI: https://example.com
Description: Custom WordPress theme for Rolling Dice Solutions, a digital marketing agency offering social media marketing, web development, product photography, and branding.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: rolling-dice
*/

/* =========================================================
   DESIGN TOKENS
   Ink:      #121214  (near-black, matches logo type)
   Signal:   #E13A2E  (brand red, matches dice logo)
   Signal-D: #B8281E  (deeper red for hover states)
   Paper:    #FBFAF8  (warm off-white background)
   Fog:      #F1EFEA  (section tint)
   Slate:    #6E6E72  (secondary text)
   Line:     #E4E1DA  (hairline borders)
   ========================================================= */

:root {
  --ink: #121214;
  --signal: #E13A2E;
  --signal-dark: #B8281E;
  --paper: #FBFAF8;
  --fog: #F1EFEA;
  --slate: #6E6E72;
  --line: #E4E1DA;
  --radius: 6px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--signal);
  margin-bottom: 14px;
}

.pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 32px;
  border-radius: 3px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--signal);
  color: #fff;
}
.btn-primary:hover { background: var(--signal-dark); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.btn-ghost-light {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 20, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--signal);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.site-logo img { height: 250px; width: auto; }
.site-logo { display: flex; align-items: center; }

.primary-nav ul {
  display: flex;
  gap: 34px;
  align-items: center;
}

.primary-nav a {
  font-family: 'Sora', sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 2px;
  position: relative;
  color: #fff;
}

.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--signal);
  transition: width 0.2s ease;
}
.primary-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: #fff; display: block; }

/* =========================================================
   HERO — full-bleed, high-contrast, diagonal red slash
   ========================================================= */

.hero {
  position: relative;
  padding: 100px 0 0;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 62%;
  height: 150%;
  background: var(--signal);
  transform: rotate(-14deg);
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 90px;
}

.hero .eyebrow-label { color: #fff; }
.hero .eyebrow-label .pip { background: #fff; }

.hero h1 {
  font-size: clamp(46px, 6.6vw, 84px);
  max-width: 11ch;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-lede {
  font-size: 19px;
  color: rgba(255,255,255,0.75);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }

.hero .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.hero-trust {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-trust div strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  color: #fff;
}
.hero-trust div span { font-size: 13px; color: rgba(255,255,255,0.6); }

/* Marquee ticker strip */
.marquee {
  background: var(--signal);
  border-top: 2px solid var(--ink);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 22s linear infinite;
}
.marquee-track span {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #fff;
  padding: 16px 40px;
  white-space: nowrap;
}
.marquee-track span.divider { color: rgba(255,255,255,0.5); padding: 16px 0; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Hero die animation — full 360° tumble, lands flat on the 4 face */
.hero-die-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  flex-direction: column;
  gap: 18px;
}

.hero-die {
  width: 320px;
  height: 320px;
  position: relative;
  transform-style: preserve-3d;
  animation: die-tumble 2.3s cubic-bezier(.22, 1, .36, 1) 1;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.45));
}

.die-shadow {
  width: 220px;
  height: 34px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0) 72%);
  animation: die-shadow-pulse 2.3s cubic-bezier(.22, 1, .36, 1) 1;
}

@keyframes die-tumble {
  0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(-50px) scale(0.55); opacity: 0; }
  8%   { opacity: 1; }
  35%  { transform: rotateX(410deg) rotateY(250deg) rotateZ(28deg) translateY(-30px) scale(1); }
  60%  { transform: rotateX(680deg) rotateY(605deg) rotateZ(-14deg) translateY(-6px) scale(1.05); }
  80%  { transform: rotateX(716deg) rotateY(712deg) rotateZ(4deg) translateY(4px) scale(0.97); }
  100% { transform: rotateX(720deg) rotateY(720deg) rotateZ(0deg) translateY(0) scale(1); opacity: 1; }
}

@keyframes die-shadow-pulse {
  0%   { transform: scale(0.4); opacity: 0; }
  35%  { transform: scale(0.7); opacity: 0.5; }
  80%  { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

.die-face {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 42px;
  border: 3px solid var(--ink);
}
.die-face .dot { width: 34px; height: 34px; border-radius: 50%; background: #fff; }

.face-front  { background: var(--ink);    transform: translateZ(160px); }
.face-back   { background: var(--signal); transform: rotateY(180deg) translateZ(160px); }
.face-right  { background: var(--signal); transform: rotateY(90deg) translateZ(160px); }
.face-left   { background: #fff;          transform: rotateY(-90deg) translateZ(160px); }
.face-top    { background: #fff;          transform: rotateX(90deg) translateZ(160px); }
.face-bottom { background: var(--ink);    transform: rotateX(-90deg) translateZ(160px); }

.face-left .dot, .face-top .dot { background: var(--signal); }

.dot-1-1 { grid-column: 2; grid-row: 2; }

.dot-2-1 { grid-column: 1; grid-row: 1; }
.dot-2-2 { grid-column: 3; grid-row: 3; }

.dot-3-1 { grid-column: 1; grid-row: 1; }
.dot-3-2 { grid-column: 2; grid-row: 2; }
.dot-3-3 { grid-column: 3; grid-row: 3; }

.dot-4-1 { grid-column: 1; grid-row: 1; }
.dot-4-2 { grid-column: 3; grid-row: 1; }
.dot-4-3 { grid-column: 1; grid-row: 3; }
.dot-4-4 { grid-column: 3; grid-row: 3; }

.dot-5-1 { grid-column: 1; grid-row: 1; }
.dot-5-2 { grid-column: 3; grid-row: 1; }
.dot-5-3 { grid-column: 2; grid-row: 2; }
.dot-5-4 { grid-column: 1; grid-row: 3; }
.dot-5-5 { grid-column: 3; grid-row: 3; }

.dot-6-1 { grid-column: 1; grid-row: 1; }
.dot-6-2 { grid-column: 1; grid-row: 2; }
.dot-6-3 { grid-column: 1; grid-row: 3; }
.dot-6-4 { grid-column: 3; grid-row: 1; }
.dot-6-5 { grid-column: 3; grid-row: 2; }
.dot-6-6 { grid-column: 3; grid-row: 3; }

/* =========================================================
   SERVICES — arranged like a die face showing 4 (the pips)
   ========================================================= */

.services { padding: 110px 0; background: var(--ink); position: relative; }

.services .section-head h2 { color: #fff; }
.services .section-head p { color: rgba(255,255,255,0.6); }
.services .eyebrow-label { color: var(--signal); }

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 3.6vw, 46px); font-weight: 700; }
.section-head p { color: var(--slate); font-size: 17px; }

.services-die {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 22px;
  position: relative;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 38px 28px 34px;
  transition: transform 0.2s ease;
  overflow: hidden;
}
.service-card:hover { transform: translateY(-8px); }

.service-card .service-num {
  position: absolute;
  top: -6px;
  right: 14px;
  font-family: 'Sora', sans-serif;
  font-size: 110px;
  font-weight: 700;
  line-height: 1;
  color: rgba(18,18,20,0.06);
  z-index: 0;
}

.service-card > * { position: relative; z-index: 1; }

/* Alternate solid white / red blocks for maximum contrast on the dark section */
.services-die .service-card:nth-child(odd) { background: #fff; }
.services-die .service-card:nth-child(odd) h3,
.services-die .service-card:nth-child(odd) p { color: var(--ink); }
.services-die .service-card:nth-child(odd) p { color: var(--slate); }
.services-die .service-card:nth-child(odd) .service-pip-icon { background: var(--ink); }
.services-die .service-card:nth-child(odd) .service-pip-icon .pip-dot { background: var(--signal); }

.services-die .service-card:nth-child(even) { background: var(--signal); }
.services-die .service-card:nth-child(even) h3,
.services-die .service-card:nth-child(even) p { color: #fff; }
.services-die .service-card:nth-child(even) p { color: rgba(255,255,255,0.85); }
.services-die .service-card:nth-child(even) .service-pip-icon { background: #fff; }
.services-die .service-card:nth-child(even) .service-pip-icon .pip-dot { background: var(--signal); }
.services-die .service-card:nth-child(even) .service-num { color: rgba(255,255,255,0.22); }

.service-pip-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.service-pip-icon .pip-dot { border-radius: 50%; background: var(--signal); }

.service-card h3 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.service-card p { color: var(--slate); font-size: 15px; margin-bottom: 0; flex-grow: 1; }

/* =========================================================
   PROCESS — "How We Roll"
   ========================================================= */

.process { padding: 110px 0; }

.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.process-step {
  padding: 34px 24px 0;
  border-right: 1px solid var(--line);
}
.process-step:last-child { border-right: none; }

.process-step .step-die {
  width: 40px;
  height: 40px;
  background: var(--ink);
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  padding: 7px;
  margin-bottom: 20px;
}
.process-step .step-die .pip-dot { border-radius: 50%; background: var(--signal); }

.process-step h3 { font-size: 18px; margin-bottom: 8px; }
.process-step p { color: var(--slate); font-size: 15px; }

/* =========================================================
   ABOUT / WHY US
   ========================================================= */

.about { padding: 110px 0; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.about h2, .about p { color: #fff; }
.about .section-head p { color: rgba(255,255,255,0.65); }

.about::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 320px;
  height: 320px;
  border: 3px solid rgba(255,255,255,0.07);
  border-radius: 44px;
  transform: rotate(22deg);
  background-image:
    radial-gradient(rgba(255,255,255,0.07) 7px, transparent 7px),
    radial-gradient(rgba(255,255,255,0.07) 7px, transparent 7px),
    radial-gradient(rgba(255,255,255,0.07) 7px, transparent 7px),
    radial-gradient(rgba(255,255,255,0.07) 7px, transparent 7px);
  background-position: 60px 60px, 220px 60px, 60px 220px, 220px 220px;
  background-repeat: no-repeat;
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-copy p { color: rgba(255,255,255,0.72); font-size: 17px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.stat-block {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 16px;
}
.stat-block strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 38px;
  color: var(--signal);
}
.stat-block span { font-size: 14px; color: rgba(255,255,255,0.6); }

/* =========================================================
   TESTIMONIALS
   ========================================================= */

.testimonials { padding: 110px 0; }

.testimonial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}

.testimonial-card .quote-mark {
  font-family: 'Sora', sans-serif;
  font-size: 40px;
  color: var(--signal);
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.testimonial-card p.quote { font-size: 16px; color: var(--ink); margin-bottom: 22px; }

.testimonial-person { display: flex; align-items: center; gap: 12px; }
.avatar-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--fog);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 600; color: var(--signal);
}
.testimonial-person strong { display: block; font-size: 14.5px; }
.testimonial-person span { font-size: 13px; color: var(--slate); }

/* =========================================================
   CTA BAND
   ========================================================= */

.cta-band {
  margin: 0 28px 110px;
  max-width: calc(var(--max) - 56px + 56px);
  background: var(--signal);
  border-radius: 16px;
  padding: 70px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 3vw, 38px); max-width: 14ch; margin-bottom: 0; }
.cta-band .cta-sub { color: rgba(255,255,255,0.85); margin-top: 10px; margin-bottom: 0; max-width: 40ch; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.cta-band .btn-primary { background: #fff; color: var(--signal); }
.cta-band .btn-primary:hover { background: var(--ink); color: #fff; }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer { background: var(--ink); border-top: 4px solid var(--signal); padding: 70px 0 30px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 15px; max-width: 32ch; }

.footer-col h4 {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 15px; }
.footer-col ul li a:hover { color: var(--signal); }

.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.footer-social a:hover { background: var(--signal); color: #fff; border-color: var(--signal); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================================
   GENERIC PAGE (page.php / index.php fallback)
   ========================================================= */

.page-hero { padding: 70px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(32px, 4vw, 48px); }
.page-content { padding: 60px 0 110px; }
.page-content .container { max-width: 760px; }
.page-content h2 { margin-top: 1.4em; }
.page-content img { border-radius: var(--radius); margin: 24px 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-die-wrap { order: -1; margin-bottom: 20px; }
  .hero-die { width: 220px; height: 220px; }
  .die-face { width: 220px; height: 220px; padding: 28px; }
  .about-grid { grid-template-columns: 1fr; }
  .services-die { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .process-step { border-bottom: 1px solid var(--line); padding-bottom: 30px; }
  .process-step:nth-child(2) { border-right: none; }
  .testimonial-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .primary-nav { display: none; position: absolute; top: 84px; left: 0; right: 0; background: var(--ink); border-bottom: 2px solid var(--signal); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 10px 28px 20px; }
  .primary-nav a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.15); color: #fff; }
  .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }
  .services-die { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .process-step { border-right: none; }
  .cta-band { padding: 44px 30px; flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
