/* ════════════════════════════════════════════════════════════
   FRITON.AGENCY — home.css
   Home page specific layout: 3D canvas, sections, hero, manifest,
   marquee, services, values, work, process, contact.
   ════════════════════════════════════════════════════════════ */

#three-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
}

main { position: relative; z-index: 10; }
section {
  position: relative;
  min-height: 100vh;
  padding: 0 48px;
  display: flex;
  align-items: center;
}

h1 { font-size: clamp(72px, 13vw, 220px); }
h2 { font-size: clamp(52px, 8vw, 140px); margin-bottom: 36px; }
h3 { font-size: clamp(28px, 3.6vw, 48px); }

/* ────── Hero ────── */
.hero {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  padding-top: 120px;
}
.hero-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero-tag::before {
  content: '';
  width: 36px; height: 1px;
  background: var(--accent);
}
.hero-subline {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 30px);
  font-style: italic;
  color: var(--ink-1);
  max-width: 560px;
  margin-top: 20px;
  line-height: 1.4;
}
.hero-meta {
  position: absolute;
  bottom: 48px;
  left: 48px; right: 48px;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.hero-meta strong {
  color: var(--ink-0);
  font-weight: 400;
  display: block;
  margin-bottom: 6px;
}

/* ────── Manifest ────── */
.manifest {
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.manifest-content { max-width: 1100px; width: 100%; }
.manifest h2 {
  font-size: clamp(36px, 5vw, 80px);
  line-height: 1.1;
  margin-bottom: 0;
  max-width: 16ch;
}
.manifest h2 em { color: var(--accent); }
.manifest-text {
  max-width: 540px;
  margin-top: 48px;
  font-size: 16px;
  color: var(--ink-1);
  line-height: 1.7;
}

/* ────── Marquee ────── */
.marquee {
  width: 100%;
  overflow: hidden;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mix-blend-mode: difference;
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 36s linear infinite;
}
.marquee-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 300;
  color: var(--ink-0);
}
.marquee-track span.outline {
  -webkit-text-stroke: 1px var(--ink-0);
  color: transparent;
}
.marquee-track span.accent {
  color: var(--accent);
  font-style: normal;
  font-family: var(--sans);
  font-weight: 300;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ────── Section content layout ────── */
.section-content {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 80px;
  flex-wrap: wrap; gap: 24px;
}
.section-header p {
  max-width: 380px;
  color: var(--ink-1);
  font-size: 16px;
  line-height: 1.6;
}
.section-header h2 { margin-top: 24px; }

/* ────── Services list ────── */
.services-list, .work-list { list-style: none; }

.service {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 60px;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { padding: 50px 0; }
.service::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 77, 46, 0.04), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}
.service:hover::before { opacity: 1; }
.service-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-2);
}
.service-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1;
  transition: color 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service:hover .service-title {
  color: var(--accent);
  transform: translateX(20px);
}
.service-desc {
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.6;
  max-width: 480px;
}
.service-arrow {
  width: 24px; height: 1px;
  background: var(--ink-2);
  position: relative;
  justify-self: end;
  transition: all 0.4s;
}
.service-arrow::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 8px; height: 8px;
  border-top: 1px solid var(--ink-2);
  border-right: 1px solid var(--ink-2);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 0.4s;
}
.service:hover .service-arrow { width: 60px; background: var(--accent); }
.service:hover .service-arrow::after { border-color: var(--accent); }

/* ────── Values block (trust signals) ────── */
.values { padding: 120px 48px; }
.values .section-content { max-width: 1320px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}
.value {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.value::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.value.fired::before { width: 50%; }
.value-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 24px;
}
.value-title {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 12px;
  line-height: 1.1;
}
.value-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-1);
}

/* ────── Work / Projects ────── */
.project {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr 80px;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project:hover { padding: 46px 0; }
.project-num {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--ink-2);
}
.project-name {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  transition: color 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project:hover .project-name {
  color: var(--accent);
  transform: translateX(20px);
}
.project-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-1);
}
.project-meta-label {
  color: var(--ink-2);
  font-size: 9px;
  letter-spacing: 0.32em;
  display: block;
  margin-bottom: 6px;
}
.project-arrow {
  justify-self: end;
  width: 24px; height: 1px;
  background: var(--ink-2);
  position: relative;
  transition: all 0.4s;
}
.project-arrow::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 8px; height: 8px;
  border-top: 1px solid var(--ink-2);
  border-right: 1px solid var(--ink-2);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 0.4s;
}
.project:hover .project-arrow { width: 60px; background: var(--accent); }
.project:hover .project-arrow::after { border-color: var(--accent); }

/* ────── Project preview (cursor follower) ────── */
.project-preview {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 360px;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  border: 1px solid var(--line);
}
.project-preview.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.project-preview-inner { width: 100%; height: 100%; transition: background 0.4s; }

/* ────── Process ────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.process-step {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.process-step::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.process-step.fired::before { width: 60%; }
.process-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 24px;
}
.process-name {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 12px;
  line-height: 1.1;
}
.process-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-1);
}

/* ────── Contact ────── */
.contact {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 56px;
  padding-top: 120px;
  padding-bottom: 80px;
}
.contact h2 {
  font-size: clamp(72px, 12vw, 200px);
  line-height: 0.95;
  max-width: 14ch;
  margin: 0;
}
.contact h2 em { color: var(--accent); }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 26px 40px;
  background: transparent;
  border: 1px solid var(--ink-0);
  color: var(--ink-0);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  overflow: hidden;
  transition: color 0.4s, border-color 0.4s;
  will-change: transform;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: -1;
}
.cta:hover::before { transform: translateY(0); }
.cta-arrow {
  width: 32px; height: 1px;
  background: currentColor;
  position: relative;
}
.cta-arrow::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 8px; height: 8px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.contact-info {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact-info strong {
  display: block;
  color: var(--ink-0);
  margin-bottom: 8px;
  font-weight: 400;
}
.contact-info a { color: var(--ink-1); transition: color 0.3s; }
.contact-info a:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   TOUCH overrides
   ════════════════════════════════════════════════════════════ */
@media (hover: none), (pointer: coarse) {
  .project-preview { display: none !important; }
  .service:hover { padding: 32px 0; }
  .service:hover .service-title { transform: none; color: inherit; }
  .service:hover .service-arrow { width: 24px; background: var(--ink-2); }
  .service:hover .service-arrow::after { border-color: var(--ink-2); }
  .service:hover::before { opacity: 0; }
  .project:hover { padding: 24px 0; }
  .project:hover .project-name { transform: none; color: inherit; }
  .project:hover .project-arrow { width: 24px; background: var(--ink-2); }
  .project:hover .project-arrow::after { border-color: var(--ink-2); }
  .service:active, .project:active { background: rgba(255, 77, 46, 0.06); }
  .service:active .service-title,
  .project:active .project-name { color: var(--accent); }
}

/* ════════════════════════════════════════════════════════════
   TABLET (≤980px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .process-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .values-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .section-header p { max-width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE (≤768px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  section { min-height: 100dvh; padding: 0 22px; }

  /* Hero */
  .hero { padding-top: 100px; gap: 18px; }
  .hero h1 { font-size: clamp(46px, 13vw, 84px); line-height: 0.95; }
  .hero-tag { font-size: 10px; letter-spacing: 0.32em; }
  .hero-tag::before { width: 24px; }
  .hero-subline { font-size: 16px; margin-top: 14px; line-height: 1.5; }
  .hero-meta {
    position: static;
    margin-top: 48px;
    padding: 0;
    flex-direction: column;
    gap: 18px;
    font-size: 9px;
    letter-spacing: 0.24em;
  }
  .hero-meta strong { font-size: 11px; }

  /* Manifest */
  .manifest { padding: 80px 22px; min-height: auto; }
  .manifest h2 { font-size: clamp(28px, 7.2vw, 44px); line-height: 1.18; }
  .manifest-text { font-size: 15px; margin-top: 32px; line-height: 1.65; }

  /* Marquee */
  .marquee { padding: 22px 0; }
  .marquee-track { gap: 36px; animation-duration: 22s; }
  .marquee-track span { font-size: clamp(34px, 10vw, 60px); }

  /* Services / Values / Work / Process */
  .services, .values, .work, .process {
    padding: 80px 22px;
    min-height: auto;
  }
  .section-header { margin-bottom: 48px; }
  h2 { font-size: clamp(38px, 10vw, 64px); }

  .service {
    grid-template-columns: 32px 1fr 16px;
    gap: 14px;
    padding: 22px 0;
  }
  .service:hover { padding: 22px 0; }
  .service-num { font-size: 9px; letter-spacing: 0.24em; }
  .service-title { font-size: clamp(24px, 6.5vw, 36px); }
  .service-desc {
    grid-column: 2 / -1;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
  }
  .service-arrow { width: 16px; }
  .service-arrow::after { width: 6px; height: 6px; }

  .values-grid { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .value { padding: 24px 0; }
  .value-num { margin-bottom: 14px; font-size: 10px; letter-spacing: 0.24em; }
  .value-title { font-size: 22px; }
  .value-desc { font-size: 13px; }

  .project {
    grid-template-columns: 32px 1fr 16px;
    gap: 14px;
    padding: 20px 0;
  }
  .project:hover { padding: 20px 0; }
  .project-num { font-size: 9px; letter-spacing: 0.24em; }
  .project-name { font-size: clamp(22px, 5.5vw, 32px); }
  .project-meta { display: none; }
  .project-arrow { width: 16px; }
  .project-arrow::after { width: 6px; height: 6px; }

  .process-grid { grid-template-columns: 1fr; gap: 0; }
  .process-step { padding: 24px 0; }
  .process-num { margin-bottom: 14px; font-size: 10px; letter-spacing: 0.24em; }
  .process-name { font-size: 22px; }
  .process-desc { font-size: 13px; }

  /* Contact */
  .contact { padding: 100px 22px 80px; gap: 32px; min-height: 100dvh; }
  .contact h2 { font-size: clamp(46px, 13vw, 80px); line-height: 0.95; }
  .cta { padding: 22px 28px; font-size: 11px; letter-spacing: 0.26em; gap: 16px; }
  .cta-arrow { width: 20px; }
  .contact-info {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.24em;
  }
}

/* ════════════════════════════════════════════════════════════
   SMALL PHONES (≤380px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .hero h1 { font-size: clamp(38px, 11.5vw, 64px); }
  .marquee-track span { font-size: 32px; }
  .service-title { font-size: 22px; }
  .project-name { font-size: 19px; }
  .contact h2 { font-size: 44px; }
}

/* ════════════════════════════════════════════════════════════
   LANDSCAPE PHONES — short screens
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (max-height: 480px) {
  section { min-height: auto; padding-top: 90px; padding-bottom: 60px; }
  .hero { padding-top: 90px; padding-bottom: 40px; }
  .hero h1 { font-size: 56px; }
  .contact { padding: 90px 22px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
}
