/* =====================================================
   PHILLIP LEE STRATEGY
   styles.css
   ===================================================== */

/* ─── Variables ─── */
:root {
  --white:        #FFFFFF;
  --near-white:   #F5F4F0;
  --near-black:   #0D0D0D;
  --dark:         #1C1C1C;
  --mid:          #6B6B6B;
  --light-border: #E4E3DF;
  --neon:         #BFFF00;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h:        72px;
  --section-pad:  clamp(80px, 11vw, 152px);
  --inner-max:    1360px;
  --inner-pad:    clamp(24px, 5vw, 80px);

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--near-black);
  overflow-x: hidden;
}

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

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

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--inner-pad);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--light-border);
}

.nav-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--near-black);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--near-black);
}

/* ─── Hero ─── */
.hero {
  background: var(--white);
  padding-top: var(--nav-h);
}

.hero-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) var(--inner-pad) var(--section-pad);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-name {
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 900;
  line-height: 0.87;
  letter-spacing: -0.045em;
  color: var(--near-black);
}

.hero-block {
  margin-top: clamp(48px, 7vw, 88px);
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.hero-hook {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--near-black);
}

.hero-credentials {
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  line-height: 1.7;
}

.hero-philosophy {
  margin-top: clamp(40px, 5vw, 64px);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  color: var(--mid);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* ─── What I Do / Services Section ─── */
.services {
  background: var(--white);
}

/* Stacked modules */
.service-module {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--light-border);
}

.service-module-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-module-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon);
  background: var(--near-black);
  padding: 4px 10px;
  border-radius: 3px;
}

.service-module--ai .service-module-label {
  color: var(--neon);
}

.service-module-intro {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--near-black);
  max-width: 680px;
}

/* Strategy bullet list — two columns, flows top-to-bottom per column */
.service-module-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 12px clamp(40px, 6vw, 80px);
}

.service-module-list li {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark);
  padding-left: 20px;
  position: relative;
}

.service-module-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--mid);
  font-size: 12px;
  top: 2px;
}

/* AI four-step row */
.service-ai-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 36px);
}

.service-ai-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--neon);
}

.service-ai-card-step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--near-black);
  opacity: 0.4;
  text-transform: uppercase;
}

.service-ai-card-title {
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--near-black);
}

.service-ai-card-body {
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 400;
  line-height: 1.7;
  color: var(--mid);
}

.service-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--near-black);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: gap 0.22s ease;
}

.service-ai-btn:hover {
  gap: 14px;
}

.service-ai-btn .arrow {
  display: inline-block;
  transition: transform 0.22s ease;
}

.service-ai-btn:hover .arrow {
  transform: translateX(4px);
}

/* ─── Shared Section Shell ─── */
.section-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: var(--section-pad) var(--inner-pad);
}

.section-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  background: var(--near-black);
  padding: 5px 10px;
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: clamp(48px, 7vw, 88px);
}

.section-title {
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--near-black);
}

.work-subline {
  margin-top: clamp(16px, 2vw, 24px);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 400;
  color: var(--mid);
  letter-spacing: 0.01em;
  line-height: 1.6;
  max-width: 520px;
}

/* ─── Work Section ─── */
.work {
  background: var(--near-white);
}

/* ─── Cards Grid ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* ─── Individual Card ─── */
.card {
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
  outline: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.35s var(--ease-out);
}

.card:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: -2px;
}

.card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  z-index: 1;
  position: relative;
}

/* Card visual area */
.card-visual {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.card-visual::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.65s var(--ease-out);
}

/* Fallback background colors */
.card-visual--snapdragon   { background-color: #05050f; }
.card-visual--apple        { background-color: #141414; }
.card-visual--instax       { background-color: #f0ece3; }
.card-visual--appleprivacy { background-color: #06080e; }
.card-visual--homedepot    { background-color: #0f0a00; }
.card-visual--android      { background-color: #0a1a0a; }

/* Inner image div — scales on hover without the tiling artifact */
.card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.65s var(--ease-out);
}

/* card-img hover transform handled by JS parallax */

.card-visual--snapdragon   .card-img { background-image: url('assets/snapdragon-card.png'); }
.card-visual--apple        .card-img { background-image: url('assets/soi-card.avif'); }
.card-visual--instax       .card-img { background-image: url('assets/instax-card.png'); }
.card-visual--appleprivacy .card-img { background-image: url('assets/privacy-card.png'); }
.card-visual--homedepot    .card-img { background-image: url('assets/homedepot-card.png'); }
.card-visual--android .card-img { background-image: url('assets/android-card.gif'); }

/* Card text content */
.card-content {
  padding: clamp(20px, 2.5vw, 32px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
}

.card-headline {
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--near-black);
  margin-bottom: 10px;
}

.card-line {
  font-size: clamp(13px, 1.1vw, 14px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--mid);
  letter-spacing: 0.005em;
  flex: 1;
  margin-bottom: 20px;
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--near-black);
  transition: gap 0.22s ease;
  align-self: flex-start;
}

.card:hover .btn-learn-more {
  gap: 14px;
}

.btn-learn-more .arrow {
  display: inline-block;
  transition: transform 0.22s ease;
}

.card:hover .btn-learn-more .arrow {
  transform: translateX(4px);
}

/* ─── Contact Section ─── */
.contact {
  background: var(--near-black);
}

.contact .section-label {
  background: var(--neon);
  color: var(--near-black);
}

.contact .section-title {
  color: var(--white);
}

.contact-links {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(22px, 3vw, 32px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s ease;
}

.contact-link:hover .contact-link-value {
  color: var(--neon);
}

.contact-link-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  width: 80px;
}

.contact-link-value {
  font-size: clamp(18px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--white);
  transition: color 0.2s ease;
}

/* ─── Footer ─── */
.footer {
  background: var(--near-black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 28px var(--inner-pad);
  display: flex;
  justify-content: center;
}

.footer span {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
}

/* ─── Modal Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--nav-h) 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-in-out);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  transform-origin: var(--modal-ox, 50%) var(--modal-oy, 50%);
  transform: scale(0.06);
  opacity: 0;
  transition: transform 0.65s var(--ease-out), opacity 0.3s ease;
  min-height: calc(100vh - var(--nav-h));
}

.modal-overlay.is-open .modal {
  transform: scale(1);
  opacity: 1;
}

/* Close button */
.modal-close {
  position: sticky;
  top: 24px;
  float: right;
  margin: 24px 24px 0 0;
  width: 44px;
  height: 44px;
  background: var(--near-black);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #2a2a2a;
  transform: rotate(90deg);
}

.modal-close span {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--white);
}

.modal-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Modal body */
.modal-body {
  padding: 0 clamp(32px, 7vw, 80px) clamp(64px, 9vw, 112px);
  clear: both;
  opacity: 0;
  transition: opacity 0.35s ease 0.3s;
}

.modal-overlay.is-open .modal-body {
  opacity: 1;
}

/* Modal content elements */
.modal-client {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  background: var(--near-black);
  display: inline-block;
  padding: 5px 10px;
  margin-bottom: 20px;
}

.modal-title {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--near-black);
  margin-bottom: clamp(36px, 5vw, 60px);
}

/* Video embed */
.modal-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--near-black);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-peekaboo-video {
  padding-bottom: 0;
  height: auto;
}

.modal-peekaboo-video video {
  display: block;
  width: 100%;
  height: auto;
}

.modal-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-video-placeholder span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

/* Gallery (Apple Shot on iPhone) */
.modal-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.modal-gallery-item {
  aspect-ratio: 4 / 3;
  background: var(--near-white);
  overflow: hidden;
  position: relative;
}

.modal-gallery-item.span-2 {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.modal-gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-gallery-placeholder span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
}

/* Modal intro (Apple Shot on iPhone framing line) */
.modal-intro {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.75;
  color: var(--mid);
  font-style: italic;
  margin-bottom: clamp(32px, 4vw, 48px);
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--light-border);
}

/* Display examples grid (Apple Privacy — Peekaboo) */
.modal-display-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.modal-display-item {
  aspect-ratio: 4 / 3;
  background: var(--near-white);
  position: relative;
  overflow: hidden;
}

/* Text sections */
.modal-section {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.modal-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--light-border);
}

.modal-section p {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--dark);
}

/* AI Transformation overlay */
.modal-ai-quote {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--near-black);
  font-style: italic;
  margin-bottom: 24px;
}

.modal-ai-intro {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--dark);
  margin-bottom: clamp(20px, 2.5vw, 28px);
}

.modal-service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-service-list li {
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark);
  padding-left: 20px;
  position: relative;
}

.modal-service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--neon);
  font-weight: 700;
  top: 1px;
}

.modal-ai-outro {
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 400;
  line-height: 1.7;
  color: var(--mid);
  font-style: italic;
  margin-top: clamp(36px, 5vw, 56px);
}

/* ─── Hero load animation ─── */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-name {
  animation: heroFadeIn 0.8s var(--ease-out) 0.05s both;
}

.hero-block {
  animation: heroFadeIn 0.8s var(--ease-out) 0.2s both;
}

.hero-philosophy {
  animation: heroFadeIn 0.8s var(--ease-out) 0.5s both;
}

/* ─── Scroll Entrance Animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

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

.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero-hook {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .service-ai-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .service-module-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .service-ai-cards {
    grid-template-columns: 1fr;
  }
}

/* ─── Noise Texture ─── */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}


/* ─── Card preview video ─── */
.card-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.card-preview-video.is-visible { opacity: 1; }

/* ─── Card parallax (no-transition during mouse movement) ─── */
.card-img.no-transition { transition: none !important; }

/* ─── Hero scroll will-change ─── */
.hero-block, .hero-philosophy { will-change: opacity, transform; }

@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

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

  .modal-gallery {
    grid-template-columns: 1fr;
  }

  .modal-gallery-item.span-2 {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }

  .modal-display-grid {
    grid-template-columns: 1fr;
  }

  .contact-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .contact-link-label {
    width: auto;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 20px;
  }
}
