/* ==========================================================================
   DotCom Media — Home page only
   1. Hero   2. Ticker   3. About strip   4. Why DotCom   5. Process
   ========================================================================== */


/* ==========================================================================
   1. Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4.5rem, 9vw, 7rem);
  color: var(--white);
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 127, 0, 0.3), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 127, 0, 0.12), transparent 40%),
    var(--dark);
}

/* faint camera grid lines in the background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero .eyebrow { color: var(--orange); }

.hero h1 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.5rem, 6.2vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.08;
}

.hero-lead {
  max-width: 50ch;
  margin-bottom: 2.2rem;
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.72);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 3rem;
  padding-top: 1.8rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats li { max-width: 12ch; }

.hero-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--white);
}

/* ---- Photo collage ---- */
.hero-visual {
  position: relative;
  padding: 1.5rem 1.5rem 3.5rem 2.5rem;
}

.hero-frame {
  aspect-ratio: 4 / 5;          /* close to the showreel's 720 x 950 shape */
  max-width: 470px;
  margin-inline: auto;
  border-radius: 10px;
  background: #000;
}

.hero-frame img,
.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* REC + timecode on top of the photo */
.hero-frame-ui {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.timecode {
  padding: 0.3rem 0.6rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--white);
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
}

/* Polaroid photos floating over the frame */
.hero-polaroid {
  position: absolute;
  z-index: 4;
  width: 34%;
  padding: 8px 8px 0;
  color: var(--ink);
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  animation: float 7s ease-in-out infinite;
}

.hero-polaroid img,
.hero-polaroid video,
.polaroid-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* empty floating video: dark frame with a play icon */
.polaroid-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #111;
  color: var(--orange);
  border-radius: 2px;
}

.polaroid-placeholder span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d9d9d9;
}

/* Services intro on the Home page in black */
.sec-head p.sec-intro-accent {
  color: var(--ink);
  font-weight: 600;
}

.hero-polaroid figcaption {
  padding: 0.45rem 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.hero-polaroid-1 {
  left: -6%;
  bottom: 0;
  rotate: -6deg;
}

.hero-polaroid-2 {
  right: -4%;
  bottom: -8%;
  rotate: 5deg;
  animation-delay: -3.5s;
}

@keyframes float {
  50% { transform: translateY(-12px); }
}


/* ==========================================================================
   2. Services ticker
   ========================================================================== */
.ticker {
  overflow: hidden;
  padding-block: 1.1rem;
  background: var(--orange);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 45s linear infinite;
}

.ticker li {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  white-space: nowrap;
}

/* black dot between items */
.ticker li::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

/* the list is doubled, so moving -50% loops perfectly */
@keyframes ticker {
  to { transform: translateX(-50%); }
}

.ticker:hover .ticker-track { animation-play-state: paused; }


/* ==========================================================================
   3. About strip
   ========================================================================== */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.about-media { padding: 10px; }

.about-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

.about-text .lead { margin-block: 1.2rem 2rem; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin: 0.5rem 0 2.25rem;
}

/* Two bold "sticker" boxes: black + orange, big numbers, slight tilt */
.about-stats li {
  position: relative;
  padding: 1.5rem 1.4rem 1.35rem;
  background: #0D0D0D;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.about-stats li:nth-child(even) {
  background: var(--orange);
  color: #000;
  transform: rotate(1.5deg);
  box-shadow: 0 14px 30px rgba(255, 127, 0, 0.35);
}

/* viewfinder corners, like the rest of the site */
.about-stats li::before,
.about-stats li::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--orange);
}
.about-stats li::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.about-stats li::after  { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }
.about-stats li:nth-child(even)::before,
.about-stats li:nth-child(even)::after { border-color: #000; }

.about-stats li:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.about-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--orange);
}
.about-stats li:nth-child(even) strong { color: #000; }

.about-stats li > span {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .about-stats li, .about-stats li:nth-child(even), .about-stats li:hover { transform: none; transition: none; }
}


/* ==========================================================================
   4. Why DotCom
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.why-card {
  padding: 1.8rem 1.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  transition: border-color 0.3s, background 0.3s;
}

.why-card:hover {
  background: rgba(255, 127, 0, 0.08);
  border-color: var(--orange);
}

.why-num {
  display: block;
  margin-bottom: 2.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--orange);
}

.why-card h3 { margin-bottom: 0.7rem; font-size: 1.15rem; }

.why-card p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.68); }

/* The 4 boxes appear one after another: they rise, sharpen and settle.
   (the delay depends on how many boxes sit side by side on the screen) */
.why-card.reveal {
  opacity: 0;
  transform: translateY(46px) scale(0.96);
  filter: blur(6px);
  transition:
    opacity 0.9s ease,
    transform 1s cubic-bezier(0.2, 0.75, 0.2, 1),
    filter 0.9s ease,
    border-color 0.3s,
    background 0.3s;
}

.why-card.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.why-card.reveal:nth-child(2) { transition-delay: 0.3s, 0.3s, 0.3s, 0s, 0s; }
.why-card.reveal:nth-child(3) { transition-delay: 0.6s, 0.6s, 0.6s, 0s, 0s; }
.why-card.reveal:nth-child(4) { transition-delay: 0.9s, 0.9s, 0.9s, 0s, 0s; }

/* the number counts the order in: it slides in just after its box */
.why-card.reveal .why-num {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: inherit;
}

.why-card.reveal.is-visible .why-num {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   5. Process timeline
   ========================================================================== */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
}

/* the orange line behind the numbered dots */
.process::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, transparent 10px 18px);
}

.process-step { position: relative; }

.process-dot {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--orange);
  transition: background 0.3s, color 0.3s;
}

.process-step:hover .process-dot { color: var(--ink); background: var(--orange); }

.process-step h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }

.process-step p { color: var(--muted); }


/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .hero-grid,
  .about-strip { grid-template-columns: 1fr; }

  .hero-visual { max-width: 620px; }

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

  /* 2 boxes per row: the right one follows the left one */
  .why-card.reveal:nth-child(odd) { transition-delay: 0s, 0s, 0s, 0s, 0s; }
  .why-card.reveal:nth-child(even) { transition-delay: 0.3s, 0.3s, 0.3s, 0s, 0s; }
}

@media (max-width: 760px) {
  .process { grid-template-columns: 1fr; gap: 2rem; }

  /* line runs down the left side on phones */
  .process::before {
    top: 28px;
    bottom: 28px;
    left: 27px;
    right: auto;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--orange) 0 10px, transparent 10px 18px);
  }

  .process-step { padding-left: 80px; }

  .process-dot { position: absolute; left: 0; top: 0; }
}

@media (max-width: 560px) {
  .hero-visual { padding: 1rem 0.5rem 3rem 1rem; }

  .hero-polaroid { width: 46%; }

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

  .about-stats { gap: 0.75rem; }

  .about-stats li { padding: 1.1rem 0.9rem 1rem; }

  .about-stats strong { font-size: 2rem; }

  .about-stats li > span { font-size: 0.78rem; }
}


/* ==========================================================================
   Text animations (Home page)
   Headings with class "words-anim" are cut into words by js/main.js (section 15);
   each word slides up into place, one after another.
   Without JavaScript, or with "reduce motion" on, the text simply shows.
   ========================================================================== */
.words-anim.is-split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;   /* room for g, y, p so they are not cut */
  margin-bottom: -0.14em;
}

.words-anim.is-split .w-in {
  display: inline-block;
  transform: translateY(108%) rotate(4deg);
  transform-origin: 0 100%;
  opacity: 0;
  transition:
    transform 0.9s cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 0.5s ease;
  transition-delay: calc(var(--i, 0) * 75ms);
}

.words-anim.is-in .w-in {
  transform: none;
  opacity: 1;
}

/* Hero: an orange line sweeps under the orange word once the title is in */
.words-hero .accent {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: 0% 0.07em;
  transition: background-size 0.9s cubic-bezier(0.6, 0, 0.2, 1) 1.1s;
}

.words-hero.is-in .accent { background-size: 100% 0.07em; }

/* Hero: the small orange line slides in, its dot pulses like a REC light */
.js-anim .hero-eyebrow {
  animation: eyebrow-in 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.js-anim .hero-eyebrow::before {
  animation: rec-pulse 1.8s ease-in-out 1s infinite;
}

@keyframes eyebrow-in {
  from { opacity: 0; transform: translateX(-24px); letter-spacing: 0.4em; }
  to { opacity: 1; transform: none; }
}

@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 127, 0, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(255, 127, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .words-anim.is-split .w-in { transform: none; opacity: 1; transition: none; }
  .words-hero .accent { background-size: 100% 0.07em; transition: none; }
  .js-anim .hero-eyebrow, .js-anim .hero-eyebrow::before { animation: none; }
}

@media (max-width: 560px) {
  /* 1 box per row: each one appears as you scroll to it */
  .why-card.reveal:nth-child(n) { transition-delay: 0s, 0s, 0s, 0s, 0s; }
}

@media (prefers-reduced-motion: reduce) {
  .why-card.reveal, .why-card.reveal .why-num { opacity: 1; transform: none; filter: none; transition: border-color 0.3s, background 0.3s; }
}
