/* ============================================================
   ARTinez v2 — Homepage
   Cinematic single-page experience
   ============================================================ */

/* ---------- HERO (cinematic photo) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  overflow: hidden;
  background: #050509;
}

/* The photograph — fills the hero edge-to-edge.
   Subject (person + AI robot) sits on the right of the composition.
   background-position keeps them visible at every viewport. */
.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/hero/artinez-ai-hero.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 62% center;
  will-change: transform;
}

/* Subtle veil — only on the left where text lives.
   Right side stays clean so the subject remains crisp. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(5,5,9,.92) 0%,
      rgba(5,5,9,.78) 22%,
      rgba(5,5,9,.45) 44%,
      rgba(5,5,9,.18) 62%,
      rgba(5,5,9,0) 80%),
    linear-gradient(180deg,
      rgba(5,5,9,.55) 0%,
      rgba(5,5,9,.15) 30%,
      rgba(5,5,9,.35) 100%);
}

/* Warm gold ambient — subtle, only behind text on the left */
.hero__atmos {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: 20%;
  left: 8%;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.18), transparent 65%);
  filter: blur(60px);
  opacity: .55;
}

/* Content — left-aligned, max-width to keep clear of the subject */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.3);
  background: rgba(212,175,55,.08);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-2);
  margin-bottom: 32px;
}
.hero__eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 12px var(--gold-2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; transform: scale(.7); } }

.hero__title {
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 28px;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,.45);
}
.hero__title .line {
  display: block;
}
.hero__title .accent {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 400;
}

.hero__sub {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: #d8d8e0;
  max-width: 52ch;
  margin: 0 0 36px;
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
}

.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Responsive composition ---------- */
/* Tablet */
@media (max-width: 980px) {
  .hero__photo {
    /* Shift focus slightly to keep both subject and reading area visible */
    background-position: 70% center;
  }
  .hero__veil {
    background:
      linear-gradient(90deg,
        rgba(5,5,9,.88) 0%,
        rgba(5,5,9,.68) 28%,
        rgba(5,5,9,.35) 50%,
        rgba(5,5,9,.08) 72%,
        rgba(5,5,9,0) 100%),
      linear-gradient(180deg, rgba(5,5,9,.4), transparent 40%, rgba(5,5,9,.3));
  }
  .hero__content { max-width: 540px; }
  .hero__title { font-size: clamp(36px, 7vw, 64px); }
}

/* Small tablet / large phone */
@media (max-width: 720px) {
  .hero {
    padding-top: 110px;
    min-height: auto;
    padding-bottom: 80px;
  }
  /* The hero photograph is a wide panoramic (1280x590, aspect 2.17).
     On LANDSCAPE phones the wide viewport lets the cropped values below
     show both subjects. On PORTRAIT phones (tall, narrow) the same values
     crop to ~24% of the image and the man+robot disappear — so portrait
     gets a dedicated override further below. */
  .hero__photo {
    background-size: 140% auto;
    background-position: 60% 40%;
  }
  .hero__veil {
    background:
      linear-gradient(180deg,
        rgba(5,5,9,.6) 0%,
        rgba(5,5,9,.85) 35%,
        rgba(5,5,9,.95) 70%,
        rgba(5,5,9,.98) 100%),
      linear-gradient(90deg,
        rgba(5,5,9,.7) 0%,
        rgba(5,5,9,.4) 60%,
        rgba(5,5,9,.2) 100%);
  }
  .hero__content { max-width: 100%; }
  .hero__title { font-size: clamp(34px, 9vw, 52px); }
  .hero__sub { font-size: 16px; max-width: 100%; }
}

/* Phone */
@media (max-width: 480px) {
  .hero { padding-top: 100px; }
  /* Narrower viewport: zoom out more so both subjects still fit */
  .hero__photo {
    background-size: 160% auto;
    background-position: 58% 42%;
  }
  .hero__title { font-size: clamp(30px, 9vw, 44px); line-height: 1.05; }
  .hero__sub { font-size: 15px; }
  .hero__ctas .btn { padding: 12px 22px; font-size: 14px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  /* Maximum zoom-out for the narrowest viewports */
  .hero__photo {
    background-size: 180% auto;
    background-position: 55% 45%;
  }
  .hero__eyebrow { font-size: 10px; padding: 6px 14px; }
}

/* Portrait phones — dedicated mobile portrait hero composition.
   The hero photograph is a wide panoramic (1280x590, aspect 2.17). On a
   tall narrow portrait viewport we cannot show the whole image at full
   height AND full width — we have to choose. The chosen approach:

   1. Use the upper portion of the photograph as the visual hero/banner
      (image occupies ~70-75% of the hero vertically).
   2. Push the text content below the image via padding-top so it never
      overlays the important subjects (man face, robot head).
   3. Position the image so both subjects fall in the visible window.

   Two media-feature matches are used for safety across Android browsers
   that may differ on (orientation) support: orientation:portrait AND
   max-aspect-ratio:1/1 (either match means portrait). The cascade puts
   these rules last so they win against the width-only rules above. */
@media (max-width: 720px) and (orientation: portrait),
       (max-aspect-ratio: 1/1) {
  .hero {
    /* Image height ≈ 200% × viewport × 590/1280 ≈ 92% of viewport.
       360px pushes content below the banner so subjects are unobscured. */
    padding-top: 360px;
  }
  .hero__photo {
    background-size: 200% auto;
    background-position: 65% top;
  }
}
@media (max-width: 480px) and (orientation: portrait),
       (max-aspect-ratio: 1/1) {
  .hero {
    padding-top: 320px;
  }
  .hero__photo {
    background-size: 200% auto;
    background-position: 65% top;
  }
}
@media (max-width: 380px) and (orientation: portrait),
       (max-aspect-ratio: 1/1) {
  .hero {
    padding-top: 280px;
  }
  .hero__photo {
    background-size: 220% auto;
    background-position: 60% top;
  }
}

/* ---------- Marquee strip ---------- */
.strip {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Vision intro ---------- */
.vision-intro {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  text-align: center;
}
.vision-intro__title {
  max-width: 18ch;
  margin: 0 auto 28px;
}
.vision-intro__lede {
  margin: 0 auto;
  max-width: 56ch;
}
.vision-intro__cta {
  margin-top: 44px;
}

/* ---------- Process timeline (Act 2 / Curiosity) ---------- */
.process {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.process__step {
  position: relative;
  padding: 32px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.005));
  border: 1px solid var(--line);
  transition: border-color var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}
.process__step:hover {
  border-color: rgba(212,175,55,.3);
  transform: translateY(-4px);
}
.process__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 18px;
}
.process__step h3 {
  font-size: 22px;
  margin-bottom: 10px;
}
.process__step p {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
}
@media (max-width: 880px) {
  .process__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .process__grid { grid-template-columns: 1fr; }
}

/* ---------- Capability showcase (Act 3) ---------- */
.showcase {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cap {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  border: 1px solid var(--line);
  transition: border-color var(--d-base) var(--ease-out);
  min-height: 280px;
}
.cap:hover { border-color: rgba(212,175,55,.3); }
.cap__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212,175,55,.2), rgba(212,175,55,.05));
  border: 1px solid rgba(212,175,55,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-2);
  margin-bottom: 20px;
}
.cap__icon svg { width: 22px; height: 22px; }
.cap h3 { font-size: 22px; margin-bottom: 8px; }
.cap p { font-size: 14px; color: var(--text-mute); margin: 0; }
.cap__link {
  /* 24px minimum target (WCAG 2.2 AA 2.5.8); the padding is taken back
     from the margin above so the card looks the same. */
  margin-top: 18px;
  padding: 3px 0;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cap__link .arrow { transition: transform var(--d-base) var(--ease-out); }
.cap:hover .cap__link .arrow { transform: translateX(4px); }
@media (max-width: 880px) {
  .showcase__grid { grid-template-columns: 1fr; }
}

/* ---------- Case study preview (Act 4) ---------- */
.cases {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.case-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.case-row.reverse { direction: rtl; }
.case-row.reverse > * { direction: ltr; }

.case-row__visual {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a26, #0a0a12);
  border: 1px solid var(--line);
  display: block;
  transition: transform var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out);
}
.case-row__visual:hover {
  border-color: rgba(212,175,55,.35);
  transform: translateY(-4px);
}
.case-row__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35) 100%);
  z-index: 1;
  pointer-events: none;
}
.case-row__visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--d-slower) var(--ease-out);
}
.case-row__visual:hover .case-row__visual-img {
  transform: scale(1.04);
}
.case-row__visual-label {
  position: absolute;
  bottom: 18px; left: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 500;
}
.case-row__visual-pl {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  text-align: center;
}
.case-row__visual-pl .brand {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-style: italic;
  font-weight: 500;
  color: #fff;
}
.case-row__visual-pl .tag {
  font-family: var(--font-script);
  color: var(--gold-2);
  font-size: 18px;
}

.case-row__visual-agi {
  width: 100%; height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #0a0a12, #050509);
}
.case-row__visual-agi .head {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  color: #a4e610;
  font-weight: 600;
  letter-spacing: -.01em;
}
.case-row__visual-agi .sub {
  font-size: 14px;
  color: var(--text-mute);
}
.case-row__visual-agi .cta {
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 999px;
  background: #a4e610;
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 600;
}

.case-row__body .rule { margin-bottom: 16px; }
.case-row__body h3 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }
.case-row__body .lede { margin-bottom: 24px; }
.case-row__meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-mute);
}
.case-row__meta span strong { display: block; color: var(--gold-3); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 4px; }

@media (max-width: 880px) {
  .case-row, .case-row.reverse { grid-template-columns: 1fr; direction: ltr; gap: 32px; }
}

/* ---------- CTA section ---------- */
.cta-band {
  margin-top: var(--section-y);
  padding: 80px 40px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(212,175,55,.06), rgba(212,175,55,.01));
  border: 1px solid rgba(212,175,55,.18);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(212,175,55,.12), transparent 60%);
  pointer-events: none;
}
.cta-band h2 {
  position: relative;
  max-width: 22ch;
  margin: 0 auto 24px;
}
.cta-band p {
  position: relative;
  max-width: 50ch;
  margin: 0 auto 36px;
}
.cta-band .ctas {
  position: relative;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Illustrative-image disclosure ---------- */
/* Used where a project visual is a placeholder rather than a genuine
   screenshot of delivered work. The disclosure is always visible. */
.case-row__visual-note {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: calc(100% - 32px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #efe9dd;
  font-weight: 500;
  line-height: 1.4;
}
.case-row__note {
  margin: 14px 0 22px;
  padding: 12px 16px;
  border-left: 2px solid var(--gold-3);
  background: rgba(255, 255, 255, .02);
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.6;
}
.case-row__note p { margin: 0; }
