/* =========================================
   IFI — Design Strategy & Development
   ========================================= */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #FAFAFA;
  --bg-alt:      #F0F0F0;
  --bg-dark:     #111111;
  --ink:         #111111;
  --ink-muted:   #666666;
  --ink-light:   #999999;
  --accent:      #C4956A;
  --accent-dark: #A87B52;
  --white:       #FFFFFF;
  --border:      #E5E5E5;
  --border-dark: rgba(255,255,255,0.08);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --nav-h: 72px;
  --container: 1200px;
  --gap: clamp(32px, 5vw, 80px);
  --section-pad: clamp(100px, 14vw, 180px);
  --radius: 4px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p  { font-size: clamp(0.9rem, 1.1vw, 1rem); line-height: 1.75; color: var(--ink-muted); }
em { font-style: italic; color: var(--accent); }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 20px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--white);
  border: 1.5px solid var(--ink);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--ink);
}
.btn--sm { padding: 10px 20px; font-size: 0.72rem; }
.btn--full { width: 100%; justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.link-arrow:hover { gap: 14px; color: var(--accent); }

/* =========================================
   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 clamp(20px, 5vw, 60px);
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__logo { display: flex; align-items: center; }
.nav__logo-mark {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 40px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  transition: color 0.2s;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__links a:hover { color: var(--accent); }

.nav__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease;
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}
.mobile-menu a {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--white);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--accent); }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) clamp(20px, 5vw, 60px) 80px;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
}

.hero__title {
  margin-bottom: 28px;
  line-height: 1.05;
}

/* Line-by-line text reveal */
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.hero__title .line__inner {
  display: block;
  transform: translateY(110%);
}
body.loaded .hero__title .line__inner {
  transform: translateY(0);
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
body.loaded .hero__title .line:nth-child(1) .line__inner { transition-delay: 0.15s; }
body.loaded .hero__title .line:nth-child(2) .line__inner { transition-delay: 0.3s; }
body.loaded .hero__title .line:nth-child(3) .line__inner { transition-delay: 0.45s; }

.hero__rule {
  height: 2px;
  width: 0;
  background: var(--accent);
  margin-bottom: 28px;
}

.hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 480px;
  margin-bottom: 48px;
  opacity: 0;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
}

/* Hero animations — triggered after preloader */
body.loaded .hero__eyebrow { animation: fadeUp 0.8s ease both 0.2s; }
body.loaded .hero__rule     { animation: lineGrow 1s ease both 0.7s; }
body.loaded .hero__sub      { animation: fadeUp 0.8s ease both 0.9s; }
body.loaded .hero__actions  { animation: fadeUp 0.8s ease both 1.1s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lineGrow {
  from { width: 0; }
  to   { width: 80px; }
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  z-index: 2;
}
.hero__scroll-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { width: 40px; opacity: 1; }
  50% { width: 20px; opacity: 0.4; }
}

/* =========================================
   MARQUEE
   ========================================= */
.marquee {
  overflow: hidden;
  padding: 20px 0;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.marquee__track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.6;
}
.marquee__track .dot { color: var(--accent); opacity: 1; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================
   SERVICES
   ========================================= */
.services {
  padding: var(--section-pad) 0;
}
.services__header {
  margin-bottom: 64px;
}
.services__header h2 { max-width: 500px; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.service-card {
  padding: 40px 0 0;
  border-top: 2px solid var(--border);
  transition: border-color 0.3s ease;
}
.service-card:hover { border-color: var(--accent); }

.service-card__icon {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 24px;
  line-height: 1;
}

.service-card__title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.service-card:hover .service-card__title { color: var(--accent); }

.service-card__desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.2s, gap 0.2s;
}
.service-card__link:hover { color: var(--accent); gap: 10px; }

/* =========================================
   FEATURED WORK
   ========================================= */
.work {
  padding: var(--section-pad) 0 clamp(60px, 10vw, 100px);
}
.work__header {
  margin-bottom: 64px;
}
.work__header h2 { max-width: 500px; }

/* Case Study — AXIS LIFE */
.case-study {
  padding: clamp(60px, 10vw, 120px) 0;
  background: var(--bg-alt);
}
.case-study__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}

.case-study__visual {
  display: flex;
  justify-content: center;
}
.case-study__phone {
  position: relative;
  width: 280px;
  aspect-ratio: 9/19;
  background: #111;
  border-radius: 36px;
  border: 3px solid #333;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
}
/* Inner screen content */
.case-study__phone::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(196,149,106,0.2) 60%, transparent 70%);
  transform: translate(-50%, -60%);
  box-shadow: 0 0 60px rgba(196,149,106,0.3);
}
/* Notch/dynamic island */
.case-study__phone::after {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 24px;
  background: #000;
  border-radius: 20px;
}
/* UI lines */
.case-study__phone-lines {
  position: absolute;
  bottom: 25%;
  left: 15%; right: 15%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-study__phone-lines span {
  display: block;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.case-study__phone-lines span:nth-child(2) { width: 70%; }
.case-study__phone-lines span:nth-child(3) { width: 45%; }

.case-study__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.case-study__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 24px;
}
.case-study__desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 32px;
  max-width: 480px;
}
.case-study__tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.case-study__tags span {
  padding: 6px 16px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--ink-muted);
}
.case-study__stats {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.case-study__stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.case-study__stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

/* Additional Work Cards */
.work__additional {
  padding: clamp(60px, 8vw, 100px) 0 0;
}
.work__additional-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.work-card {
  cursor: pointer;
}
.work-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 4px;
  margin-bottom: 20px;
  transition: transform 0.5s ease;
  overflow: hidden;
  position: relative;
}
.work-card:hover .work-card__img { transform: scale(1.02); }

/* Placeholder gradients */
.work-card__img--1 {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, var(--accent) 100%);
}
.work-card__img--2 {
  background: linear-gradient(160deg, #0d0d0d 0%, #2d2d2d 100%);
}
.work-card__img--2::after {
  content: '23:23';
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: rgba(196,168,112,0.5);
  letter-spacing: 0.05em;
}
.work-card__img--3 {
  background: linear-gradient(145deg, #f5f0e8 0%, #e0d5c5 100%);
}
.work-card__img--3::after {
  content: '3415';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 300;
  color: rgba(17,17,17,0.15);
}

.work-card__info h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.work-card:hover .work-card__info h3 { color: var(--accent); }
.work-card__info p {
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.work-card__tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* =========================================
   ABOUT / ORIGIN STORY
   ========================================= */
.about {
  padding: var(--section-pad) 0;
}
.about__header {
  text-align: center;
  margin-bottom: 64px;
}
.about__header h2 {
  font-style: italic;
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.about__story p {
  max-width: 520px;
  margin-bottom: 20px;
}
.about__story p:first-child {
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.8;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat__label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.about__values {
  margin-top: 40px;
}
.about__values p {
  font-size: 0.88rem;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  margin-bottom: 20px;
  color: var(--ink-muted);
}

/* =========================================
   PROCESS
   ========================================= */
.process {
  padding: var(--section-pad) 0;
  background: var(--bg-alt);
}
.process__header {
  margin-bottom: 64px;
}
.process__header h2 { max-width: 500px; }

.process__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  position: relative;
}
.process__steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--border);
}

.process__step {
  position: relative;
  z-index: 1;
}
.process__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1;
}
.process__step h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.process__step p {
  font-size: 0.85rem;
  line-height: 1.7;
}

/* =========================================
   PHILOSOPHY
   ========================================= */
.philosophy {
  padding: clamp(60px, 10vw, 100px) 0;
  background: var(--bg-dark);
}
.philosophy__quote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  color: var(--white);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.philosophy__quote cite {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 24px;
}

/* =========================================
   CONTACT
   ========================================= */
.contact {
  padding: clamp(80px, 12vw, 160px) 0;
  background: var(--bg-dark);
  color: var(--white);
}
.contact h2 { color: var(--white); }
.contact .section-label { color: rgba(255,255,255,0.4); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap);
  align-items: start;
}

.contact__left h2 { margin-bottom: 40px; }
.contact__info p {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.contact__social {
  display: flex;
  gap: 24px;
  margin-top: 40px;
}
.contact__social a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.contact__social a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.2);
}
.form-group select option { background: #1a1a1a; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(196,149,106,0.05);
}
.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-success {
  display: none;
  text-align: center;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 12px;
  border: 1px solid rgba(196,149,106,0.35);
  border-radius: var(--radius);
}
.form-success.visible { display: block; }

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--bg-dark);
  padding: clamp(60px, 8vw, 100px) 0 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--white);
  display: block;
  margin-bottom: 12px;
}
.footer__brand p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.7;
}

.footer__nav {
  display: flex;
  gap: 60px;
}
.footer__col h4 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
}

/* =========================================
   PRELOADER
   ========================================= */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.preloader.exit {
  transform: translateY(-100%);
}
.preloader__inner {
  text-align: center;
}
.preloader__logo {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  animation: preloaderFadeIn 1.2s ease both 0.3s;
}
.preloader__line {
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  margin: 24px auto 0;
  animation: preloaderLine 1s ease both 1s;
}
@keyframes preloaderFadeIn {
  from { opacity: 0; letter-spacing: 0.5em; }
  to   { opacity: 1; letter-spacing: 0.35em; }
}
@keyframes preloaderLine {
  from { width: 0; }
  to   { width: 60px; }
}

/* =========================================
   MAGNETIC BUTTONS
   ========================================= */
.btn {
  transition: all 0.25s ease, transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* =========================================
   SCROLL PROGRESS BAR
   ========================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  z-index: 110;
  transition: none;
  pointer-events: none;
}

/* =========================================
   CUSTOM CURSOR
   ========================================= */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor.visible { opacity: 1; }
.cursor.hover {
  width: 48px; height: 48px;
  background: rgba(196,149,106,0.15);
  border: 1.5px solid var(--accent);
  mix-blend-mode: normal;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(196,149,106,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, border-color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.cursor-ring.visible { opacity: 1; }
.cursor-ring.hover {
  width: 0; height: 0;
  opacity: 0;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor, .cursor-ring { display: none !important; }
}

/* =========================================
   HERO BACKGROUND (GRID + GLOW)
   ========================================= */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
}
body.loaded .hero__grid { animation: fadeIn 1.5s ease both 0.3s; }
.hero__grid svg {
  width: 100%; height: 100%;
}
.hero__grid line {
  stroke: var(--border);
  stroke-width: 0.5;
  opacity: 0.4;
}
.hero__glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,149,106,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: left 0.8s ease, top 0.8s ease;
  filter: blur(40px);
  opacity: 0;
}
body.loaded .hero__glow { animation: fadeIn 2s ease both 0.8s; }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================
   PHONE MOCKUP ANIMATION
   ========================================= */
.case-study__phone {
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* Phone screen content cycling */
.case-study__phone-screen {
  position: absolute;
  inset: 50px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1;
}
.case-study__phone-screen__label {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(196,149,106,0.6);
  opacity: 0;
  animation: screenFade 9s ease infinite;
}
.case-study__phone-screen__title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  animation: screenFade 9s ease infinite;
  animation-delay: 0.15s;
}
.case-study__phone-screen__bar {
  width: 40px; height: 2px;
  background: var(--accent);
  opacity: 0;
  animation: screenFade 9s ease infinite;
  animation-delay: 0.3s;
}
/* Cycle through 3 screens: each shows for 3s */
.screen-2 .case-study__phone-screen__label,
.screen-2 .case-study__phone-screen__title,
.screen-2 .case-study__phone-screen__bar {
  animation-delay: 3s, 3.15s, 3.3s;
}
.screen-3 .case-study__phone-screen__label,
.screen-3 .case-study__phone-screen__title,
.screen-3 .case-study__phone-screen__bar {
  animation-delay: 6s, 6.15s, 6.3s;
}
@keyframes screenFade {
  0%, 5%    { opacity: 0; transform: translateY(4px); }
  10%, 28%  { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* =========================================
   TESTIMONIAL
   ========================================= */
.testimonial {
  padding: clamp(80px, 12vw, 140px) 0;
  background: var(--bg);
}
.testimonial__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.testimonial__mark {
  display: block;
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 32px;
}
.testimonial__text {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 32px;
}
.testimonial__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.testimonial__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 400;
}
.testimonial__meta {
  text-align: left;
}
.testimonial__name {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.testimonial__role {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* =========================================
   PARALLAX ELEMENTS
   ========================================= */
[data-parallax] {
  will-change: transform;
}

/* =========================================
   SCROLL REVEAL
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: repeat(3, 1fr); }
  .case-study__grid { grid-template-columns: 1fr; text-align: center; }
  .case-study__desc { margin-left: auto; margin-right: auto; }
  .case-study__tags { justify-content: center; }
  .case-study__stats { justify-content: center; }
  .work__additional-grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__menu-toggle { display: flex; }

  .services__grid { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr; }
  .process__steps::before { display: none; }

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

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

  .about__stats { grid-template-columns: repeat(3, 1fr); }

  .footer__top { flex-direction: column; gap: 40px; }
  .footer__nav { gap: 32px; flex-wrap: wrap; }
  .footer__bottom { flex-direction: column; }

  .hero__glow { width: 300px; height: 300px; }
  .testimonial__text { font-size: 1.15rem; }
}

@media (max-width: 480px) {
  .about__stats { grid-template-columns: 1fr; }
  .case-study__stats { flex-direction: column; gap: 24px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .philosophy__quote { font-size: 1.4rem; }
}
