/* ==========================================================================
   LEVEL UP WITH RIO — Landing page styles
   Palette, type, and layout rules per Voice & Brand Kit v1.1 (Part 5)
   ========================================================================== */

:root {
  --burgundy: #8D112B;
  --deep-wine: #700D22;
  --ruby: #B71637;
  --cream: #ECD4BC;
  --ivory: #F1E0CF;
  --sand: #DDB48A;
  --espresso: #181109;
  --ink: #3A2B22;
  --white: #FFFFFF;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-script: 'Pinyon Script', cursive;
  --font-sub: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Arimo', sans-serif;

  --max-line: 70ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(170deg, var(--ivory) 0%, var(--cream) 45%, var(--sand) 130%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 440;
  font-style: normal;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--espresso);
}

h1 { font-weight: 400; }

.script {
  font-family: var(--font-script);
  color: var(--burgundy);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
}

.script-light { color: var(--cream); }

.eyebrow {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 600;
  color: var(--burgundy);
}

p { max-width: var(--max-line); }

.lede {
  font-size: 19px;
  color: var(--ink);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--ruby), var(--burgundy) 55%, var(--deep-wine));
  color: var(--white);
  box-shadow: 0 6px 24px -4px rgba(141, 17, 43, 0.55);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--burgundy), var(--deep-wine) 70%);
  box-shadow: 0 10px 32px -4px rgba(141, 17, 43, 0.7);
}

.btn-ghost {
  background: transparent;
  color: var(--espresso);
  border-color: var(--espresso);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.btn-ghost:hover {
  background: var(--espresso);
  color: var(--cream);
  box-shadow: 0 8px 28px -6px rgba(24, 17, 9, 0.5);
}

.btn-ghost-light {
  background: transparent;
  color: var(--cream);
  border-color: var(--sand);
}
.btn-ghost-light:hover {
  background: var(--cream);
  color: var(--espresso);
  border-color: var(--cream);
  box-shadow: 0 8px 28px -4px rgba(236, 212, 188, 0.35);
}

.text-link {
  color: var(--burgundy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--sand);
}
.text-link:hover { border-color: var(--burgundy); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, rgba(241, 224, 207, 0.94), rgba(236, 212, 188, 0.9));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sand);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 6px 20px -4px rgba(141, 17, 43, 0.45);
}

.site-header nav a {
  font-family: var(--font-sub);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  margin-left: 28px;
}
.site-header nav a:hover { color: var(--burgundy); }
.site-header nav a.header-cta,
.site-header nav a.header-cta:hover { color: var(--white); }
.header-cta { display: inline-block; }

/* ---------- section rhythm ---------- */

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-espresso {
  background: linear-gradient(155deg, var(--espresso) 0%, var(--deep-wine) 85%, var(--burgundy) 140%);
  color: var(--cream);
}
.section-espresso h1, .section-espresso h2, .section-espresso h3 { color: var(--white); }
.section-espresso p { color: var(--ivory); }

.section-ivory { background: var(--ivory); }

.section-white {
  background: linear-gradient(165deg, #FFFFFF 0%, var(--ivory) 120%);
}

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-top: 10px; }

.section-subtext {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ivory);
  opacity: 0.85;
}

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 96px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  margin-top: 14px;
  letter-spacing: -0.01em;
}

.hero h1 .script { font-size: 1.25em; }

.hero .lede { margin-top: 22px; margin-bottom: 32px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  -webkit-mask-image: radial-gradient(ellipse 68% 72% at 50% 42%, black 45%, transparent 88%);
  mask-image: radial-gradient(ellipse 68% 72% at 50% 42%, black 45%, transparent 88%);
}

/* ---------- intro ---------- */

.intro-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 820px) {
  .intro-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.intro-grid-photo {
  align-items: center;
}

@media (min-width: 820px) {
  .intro-grid-photo { grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
}

.intro-photo {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 20px 50px -14px rgba(58, 43, 34, 0.35);
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.intro-grid-photo .intro p { margin-bottom: 16px; }

.intro h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 24px; line-height: 1.2; }

/* ---------- services ---------- */

.service-list {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

@media (min-width: 760px) {
  .service-list { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
}

@media (min-width: 1100px) {
  .service-list { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(183, 22, 55, 0.35), transparent 60%),
    linear-gradient(165deg, var(--espresso) 0%, var(--deep-wine) 160%);
  border: 1px solid rgba(221, 180, 138, 0.25);
  border-radius: 14px;
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.service-card:hover {
  transform: scale(1.035);
  border-color: var(--ruby);
  box-shadow: 0 24px 48px -16px rgba(183, 22, 55, 0.55);
  z-index: 2;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
  background: rgba(236, 212, 188, 0.12);
  border: 1px solid rgba(236, 212, 188, 0.25);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
}

.service-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ruby);
  box-shadow: 0 0 8px 1px var(--ruby);
}

.service-card-body {
  margin-top: 0;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-body .service-cta {
  margin-top: auto;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 10px;
}

.service-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ivory);
  margin-bottom: 20px;
}

.service-check {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.service-check li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--sand);
}

.service-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(183, 22, 55, 0.25);
  border: 1px solid var(--ruby);
}

.service-check li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--ruby);
  border-bottom: 2px solid var(--ruby);
  transform: rotate(-45deg);
}

.service-cta {
  margin-top: 22px;
  align-self: flex-start;
  padding: 12px 22px;
  font-size: 12px;
}

.section-closer {
  margin-top: 40px;
  font-style: italic;
  color: var(--ink);
}

/* ---------- flags ---------- */

.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
  background: rgba(236, 212, 188, 0.08);
  border: 1px solid rgba(236, 212, 188, 0.22);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
}

.flag-chip .flag {
  font-size: 18px;
  line-height: 1;
}

/* ---------- experience / stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--sand);
  margin-top: 48px;
  border: 1px solid var(--sand);
}

@media (min-width: 760px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat-cell {
  background: linear-gradient(160deg, var(--espresso), var(--deep-wine) 160%);
  padding: 32px 24px;
  text-align: left;
}

.stat-num {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1;
}
.stat-num .script { font-size: 0.9em; }

.stat-label {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: var(--sand);
  margin-top: 10px;
}

/* ---------- credentials ---------- */

.cred-inline {
  margin-top: 56px;
}

.cred-card-box {
  background: var(--ivory);
  border-radius: 14px;
  padding: 32px 30px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.5);
}

.cred-card-box .cred-inline-eyebrow {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 600;
  color: var(--ruby);
  margin: 0 0 8px;
}

.cred-card-box .cred-inline-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--espresso);
  margin: 0 0 20px;
}

.cred-bullets {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.cred-bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.cred-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--burgundy);
}

.cred-bullets strong {
  color: var(--espresso);
  font-weight: 700;
}

.cert-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  margin-top: 32px;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.cert-strip::-webkit-scrollbar { display: none; }

.cert-thumb {
  flex: 0 0 auto;
  width: 150px;
  text-decoration: none;
  display: block;
}

.cert-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--sand);
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cert-thumb:hover img {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -8px rgba(58, 43, 34, 0.35);
}

.cert-thumb span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- testimonials ---------- */

.testimonials-section { padding-left: 0; padding-right: 0; }
.testimonials-section .section-head { padding: 0 32px; }

.testimonial-viewport {
  position: relative;
  margin-top: 40px;
}

.testimonial-track {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 4px 32px 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-arrow-prev { left: 12px; }
.testimonial-arrow-next { right: 12px; }

@media (min-width: 760px) {
  .testimonial-arrow-prev { left: 28px; }
  .testimonial-arrow-next { right: 28px; }
}

.testimonial-card {
  margin: 0;
  flex: 0 0 auto;
  width: 320px;
  scroll-snap-align: start;
  background: var(--ivory);
  border-top: 3px solid var(--burgundy);
  padding: 28px 24px 24px;
  position: relative;
}

.testimonial-quote-mark {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  color: var(--sand);
  margin-bottom: 2px;
}

.testimonial-quote-wrap {
  position: relative;
  max-height: 168px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.testimonial-quote-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(241,224,207,0) 0%, var(--ivory) 90%);
  transition: opacity 0.2s ease;
}

.testimonial-card[data-expanded="true"] .testimonial-quote-wrap {
  max-height: 1400px;
}

.testimonial-card[data-expanded="true"] .testimonial-quote-wrap::after {
  opacity: 0;
}

.testimonial-quote {
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.testimonial-quote p { margin: 0 0 12px; }
.testimonial-quote p:last-child { margin-bottom: 0; }

.testimonial-toggle {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  font-weight: 600;
  color: var(--burgundy);
  cursor: pointer;
  border-bottom: 1px solid var(--sand);
}

.testimonial-toggle:hover { color: var(--deep-wine); border-color: var(--burgundy); }

.testimonial-attr {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--sand);
  margin-top: 16px;
  padding-top: 14px;
}

.testimonial-name {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
  font-weight: 600;
  color: var(--espresso);
}

.testimonial-role {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.75;
}

.testimonial-card-pending { border-top-color: var(--sand); }
.testimonial-card-pending .testimonial-quote-wrap { max-height: none; }
.testimonial-card-pending .testimonial-quote-wrap::after { display: none; }

.testimonial-pending-text {
  opacity: 0.6;
}

@media (max-width: 600px) {
  .testimonial-card { width: 260px; }
}

/* ---------- portfolio marquee ---------- */

.portfolio-section { padding-left: 0; padding-right: 0; }
.portfolio-section .section-head { padding: 0 32px; }

.marquee {
  position: relative;
  margin-top: 48px;
}

.marquee-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marquee-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 32px 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.marquee-track::-webkit-scrollbar { display: none; }

.marquee-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(236, 212, 188, 0.3);
  background: rgba(24, 17, 9, 0.75);
  backdrop-filter: blur(4px);
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.marquee-arrow:hover {
  border-color: var(--ruby);
  box-shadow: 0 8px 24px -6px rgba(183, 22, 55, 0.6);
  background: var(--espresso);
}

.marquee-arrow-prev { left: 12px; }
.marquee-arrow-next { right: 12px; }

@media (min-width: 760px) {
  .marquee-arrow-prev { left: 28px; }
  .marquee-arrow-next { right: 28px; }
}

.marquee-card {
  position: relative;
  flex: 0 0 auto;
  width: 360px;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--deep-wine);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.5);
  scroll-snap-align: start;
}

.marquee-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.marquee-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(0deg, rgba(24,17,9,0.92) 0%, rgba(24,17,9,0) 100%);
}

.marquee-card .p-title {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
}

.marquee-card .p-type {
  font-size: 13px;
  color: var(--sand);
}

@media (max-width: 600px) {
  .marquee-card { width: 280px; }
}

/* ---------- close ---------- */

.close-section { text-align: center; }
.close-section .wrap { max-width: 720px; }
.close-section h2 { font-size: clamp(30px, 5vw, 44px); }
.close-section .lede { margin: 24px auto 36px; }
.close-section .hero-ctas { justify-content: center; }
.close-section .secondary-line { margin-top: 28px; color: var(--ivory); font-size: 15px; }
.close-section .secondary-line a { color: var(--sand); }

.contact-grid {
  display: grid;
  gap: 20px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  border-radius: 10px;
  border: 1px solid rgba(236, 212, 188, 0.25);
  background: rgba(236, 212, 188, 0.06);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--ruby);
  box-shadow: 0 12px 32px -10px rgba(183, 22, 55, 0.5);
}

.contact-label {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
  color: var(--ruby);
}

.contact-value {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--white);
}

/* ---------- footer ---------- */

footer {
  background: linear-gradient(180deg, var(--espresso), #0f0a05);
  color: var(--sand);
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
  border-top: 1px solid var(--deep-wine);
}
footer a { color: var(--sand); }

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  height: 30px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(236, 212, 188, 0.25));
}

.footer-inner p { margin: 0; }

/* ---------- utility ---------- */

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- heading fade-in ---------- */

.fade-heading {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-heading-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- cursor sparkles ---------- */

.cursor-sparkle {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: sparkle-float 0.85s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes sparkle-float {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4) rotate(160deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-sparkle { display: none; }
  .fade-heading {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
