/*
Theme Name: James Roby
Theme URI: https://james-roby.com/
Author: Your Name
Author URI: https://james-roby.com/
Description: Bold single-page theme for leadership, culture, and performance coaching.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: james-roby
*/

:root {
  --color-bg: #030303;
  --color-surface: #0d0d0d;
  --color-card: #151515;
  --color-muted: #c5c5c5;
  --color-primary: #e30613;
  --color-primary-dark: #b50a13;
  --color-border: #2a2a2a;
  --gradient-hero: linear-gradient(120deg, rgba(3, 3, 3, 0.9) 10%, rgba(3, 3, 3, 0.4) 90%);
  --font-display: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --transition-fast: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-display);
  background: var(--color-bg);
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

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

p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  z-index: 100;
}

section {
  padding: clamp(3rem, 6vw, 6rem) 0;
}

.container {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  font-size: 0.95rem;
}

.btn--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 12px 30px rgba(227, 6, 19, 0.3);
}

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

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(1.2rem + env(safe-area-inset-top, 0px)) 0 1.2rem;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav ul {
  display: flex;
  gap: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.primary-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
}

.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 820px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-size: cover;
  background-position: top right;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin: 0;
}

.hero h1,
.about__title,
.section-title,
.focus__text h3 {
  line-height: 1.08;
}

.hero__text {
  font-size: 1.15rem;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stats-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.stats-bar__marquee {
  width: 100%;
  overflow: hidden;
}

.stats-bar__track {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: statsMarquee var(--stats-speed, 28s) linear infinite;
}

.stat-card {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.45rem 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.stat-card__value {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
}

.stat-card__label {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.75);
}

.about {
  background: var(--color-bg);
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.about__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.about__card {
  background: var(--color-card);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.about__card::after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(227, 6, 19, 0.15);
  bottom: -120px;
  right: -120px;
  filter: blur(10px);
}

.about__image {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.focus {
  background: var(--color-surface);
}

.section-heading {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 1rem;
}

.focus__panel {
  background: var(--color-card);
  border-radius: 32px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.focus__tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.focus__tab {
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border var(--transition-fast);
}

.focus__tab[aria-selected='true'] {
  background: rgba(227, 6, 19, 0.18);
  color: #fff;
  border-color: rgba(227, 6, 19, 0.6);
}

.focus__content {
  display: none;
  gap: 2rem;
  align-items: center;
}

.focus__content.is-active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus__media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.focus__media img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 16px;
}

.focus__text h3 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

.focus__bullets {
  margin: 0 0 1.5rem 1rem;
  list-style: disc;
  color: rgba(255, 255, 255, 0.8);
}

.timeline {
  background: var(--color-bg);
}

.timeline__rail {
  position: relative;
  overflow-x: auto;
  padding-bottom: 2rem;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.timeline__rail::-webkit-scrollbar {
  height: 8px;
}

.timeline__rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.timeline__track {
  display: flex;
  gap: 2rem;
  padding: 2rem 0 0;
  min-width: max-content;
}

.timeline__item {
  position: relative;
  padding-top: 3rem;
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.timeline__dot {
  position: absolute;
  top: -12px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 4px solid var(--color-bg);
}

.timeline__year {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.timeline__text {
  color: rgba(255, 255, 255, 0.8);
}

@keyframes statsMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-25%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats-bar__track {
    animation: none;
  }
}

.newsletter {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.newsletter__panel {
  background: var(--color-card);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.newsletter__form input[type='email'] {
  flex: 1 1 260px;
  padding: 0.85rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.newsletter__feedback {
  margin-top: 1rem;
  font-weight: 600;
}

.contact-cta {
  background: var(--color-bg);
}

.contact-cta__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.contact-cta__card {
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--color-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-cta__label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.contact-cta__social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-cta__social a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform var(--transition-fast), border var(--transition-fast);
}

.contact-cta__social a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}

.contact-cta__social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.site-footer {
  padding: 3rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.footer-nav ul {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
  .site-header__inner {
    padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 0 0.9rem;
  }

  .primary-nav ul {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    background: rgba(3, 3, 3, 0.95);
    flex-direction: column;
    padding: calc(1.8rem + env(safe-area-inset-top, 0px)) 2.5rem 2rem;
    transform: translateY(-120%);
    transition: transform var(--transition-fast);
  }

  .primary-nav.is-open ul {
    transform: translateY(0);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav .nav-cta {
    display: none;
  }

  .about__grid,
  .focus__content.is-active {
    grid-template-columns: 1fr;
  }

  .focus__media img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .site-header__inner {
    padding: calc(1.05rem + env(safe-area-inset-top, 0px)) 0 0.85rem;
  }

  .brand {
    font-size: 1.1rem;
    line-height: 1.2;
  }

  body {
    font-size: 0.95rem;
  }

  .hero {
    min-height: 70vh;
    align-items: flex-end;
    background-image: url('assets/images/image27 (1).jpeg');
    background-position: top center;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero__text {
    display: none;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    margin-top: 0.5rem;
  }

  .hero__content {
    width: 100%;
    margin-top: auto;
    padding-bottom: 2.5rem;
    gap: 1rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .about__title {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .focus__text h3 {
    font-size: 1.6rem;
  }

  .focus__media {
    grid-template-columns: 1fr;
  }

  .focus__media img {
    display: none;
  }

  .focus__media img:first-child {
    display: block;
    height: 220px;
  }

  .timeline__track {
    gap: 1.5rem;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form input[type='email'] {
    flex: none;
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
  }

  .stat-card__value {
    font-size: 2rem;
  }
}
