:root{
  --bg: #0f172a;
  --accent: #ecf881;
  --line: rgba(255,255,255,0.07);
  --header: #fff;
  --text: rgba(255,255,255,0.88);
}

*{ 
  box-sizing: border-box; 
  margin:0; 
  padding:0; 
}

html{ 
  scroll-behavior: smooth; 
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
}

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

h1{
  font-family: 'Lora', serif;
  letter-spacing: 0.01em;
  font-size: 56px;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.15s;
}

h2{
  font-family: 'Lora', serif;
  font-size: 36px;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

h3{
  font-family: 'Lora', serif;
  font-size: 20px;
  margin-bottom: 8px;
}

ul {
  margin-block-start: 1em;
  padding-inline-start: 16px;
}

/* ---------- HERO ---------- */
.hero{
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-glow{
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 180%;
  background:
    radial-gradient(closest-side at 30% 30%, #7c3aed 0%, rgba(124,58,237,0.55) 35%, transparent 70%),
    radial-gradient(closest-side at 65% 55%, #4338ca 0%, rgba(67,56,202,0.5) 40%, transparent 75%);
  filter: blur(40px);
  transform: rotate(-6deg);
  opacity: 0.92;
  pointer-events: none;
}

.hero-grid{
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100% / 20)),
    repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 72.7px);
  pointer-events: none;
}

.hero-shadow{
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0) 30%, var(--bg) 100%);
  pointer-events: none;
}

/* ---------- NAVIGATION ---------- */
header{
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 20%;
  font-family: 'Lora', serif;
  font-weight: 700;
}

.logo {
  letter-spacing: 0.03em;
}

nav{
  display: flex;
  gap: 32px;
}

nav a{
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
  letter-spacing: 0.03em;
}

nav a::after{
  content: "";
  position: absolute;
  left: 0; 
  bottom: -2px;
  width: 0; 
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

nav a:hover::after{ 
  width: 100%; 
}

nav a.active{ 
  color: var(--accent); 
}

/* ---------- HERO CONTENT ---------- */
.hero-content{
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 20%;
}

.hero-inner{
  max-width: 598px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eyebrow{
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.05s;
}

.function{
  display: inline-block;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

.function.fade-out{
  opacity: 0;
  transform: translateY(-6px);
}

.hero-inner p.lede{
  max-width: 470px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.3s;
}

.actions{
  display: flex;
  gap: 12px;
  margin-top: 8px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.45s;
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 36px;
  font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active{ 
  transform: scale(0.96); 
}

.btn-primary{
  background: var(--accent);
  color: #0f172a;
}

.btn-primary:hover{
  box-shadow: 0 0 0 6px rgba(236,248,129,0.2);
}

.btn-secondary{
  background: transparent;
  border: 1px solid #ffffff;
  color: #fff;
}

.btn-secondary:hover{
  box-shadow: 0 0 0 6px rgba(255,255,255,0.15);
}

.btn-tertiary{
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 8px 4px;
}

.btn-tertiary:hover{
  border-bottom: 1px solid var(--accent);
}

@keyframes pulse{
  0%,100%{ opacity: 1; }
  50%{ opacity: 0.3; }
}

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

.number { 
  font-size: .9rem; 
  color: rgba(255,255,255,0.6);
}

.item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
}

.item h3 { 
  font-weight: 600;
  margin: 16px 0 8px; 
}

/* ---------- SECTIONS ---------- */
section.page{
  position: relative;
  padding: 80px 20%;
  overflow: hidden;
}

.about-shadow,
.about-glow,
.about-grid-overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.about-shadow{
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(15,23,42,0) 50%, var(--bg) 100%);
  z-index: 1;
}

.about-glow{
  inset: 0% -10% -10% -10%;
  background:
    radial-gradient(closest-side at 25% 18%, #7c3aed 0%, rgba(124,58,237,0.4) 35%, transparent 68%),
    radial-gradient(closest-side at 80% 60%, #4338ca 0%, rgba(67,56,202,0.3) 45%, transparent 78%);
  filter: blur(60px);
  transform: rotate(-6deg);
  opacity: 0.92;
  z-index: 1;
}

.about-grid-overlay{
  background-image:
    repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100% / 20)),
    repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 72.7px);
  z-index: 1;
}

.section-label{
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

/* Work grid */
.work-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.work-card{
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.work-card:hover{
  transform: translateY(-6px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(236,248,129,0.4);
}

.work-card img{
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.work-card-content{
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-card p{
  flex-grow: 1;
  margin-bottom: 24px;
}

/* About */
.about-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.about-visual{
  border-radius: 50% 50% 0px 0px / 42% 42% 0px 0px;
  overflow: hidden;
   margin: 60px;
}

.about-visual img{
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.about-copy{
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-text{
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
}

.about-text p{ 
  margin-bottom: 16px; 
}

/* Contact */
.contact-text{
  line-height: 1.5;
  max-width: 46%;
}

/* Footer */
footer{
  padding: 32px 20% 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.contact-actions,
.footer-actions{
  margin-top: 32px;
}

/* Detail Page */
.detail-page{
  margin: 0 auto;
  padding: 0 20%;
}

.detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.detail-page .lede{
  max-width: 400px;
}

.wrap {
  display: flex;
  flex-direction: column;
  gap: 120px;
  margin-top: 120px;
}

.learnings,
.discovery{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.problem-grid p,
.solution-text p{
  margin: 0 0 20px 0;
}

.tagline{
  font-size: 20px;
  font-style: italic;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  width: 600px;
}

.list-label{
  margin-bottom: 12px;
}

.list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li{
  position: relative;
  padding-left: 16px;
}

.list li::before{
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}

.list u{
  text-decoration-color: rgba(238,240,246,0.45);
  text-underline-offset: 4px;
}

.problem p,
.discovery-text,
.solution p, 
.test-iterate p,
.research p{
  max-width: 580px;
  margin-bottom: 16px;
}

.row {
  margin: 60px 0 100px;
}

.paragraph{
  width: 600px;
  margin-bottom: 20px;
}

.meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill { 
  border:1px solid var(--line); 
  padding: 8px 12px; 
  border-radius:999px; 
  font-size:.85rem; 
  background: rgba(255,255,255,0.08);
}

.quote {
  font-size: 32px;
  line-height: 1.3;
  max-width: 850px;
  margin: 12px 0 0;
}

.three-column-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0px, 1fr));
  gap: 32px;
}

.two-column-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0px, 1fr));
  gap: 32px;
}

.index {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.solution-grid{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.solution-image{
  display: flex;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(#7C3AED, #4338CA);
  border-radius: 8px;
  margin: 16px 0 32px 0;
}

.research img {
  margin: 16px 0 32px 0;
}

.dark-panel {
  padding: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

/* Case Study Navigation */
.case-study-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.case-study-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
}

.case-study-nav a:hover {
  transform: translateX(-4px);
}

.case-study-nav .nav-next:hover {
  transform: translateX(4px);
}

.nav-next {
  justify-content: flex-end;
}

.nav-arrow {
  font-size: 24px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.nav-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.nav-next .nav-text {
  text-align: right;
}

.nav-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.nav-title {
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 1360px){ 
  section.page, 
  .hero-content,
  .detail-page{ 
    padding: 72px 6%; 
  }

  header{ 
    padding: 40px 6%; 
  }

  footer{ 
    padding: 32px 6% 48px; 
  }
}

@media (max-width: 1100px){
  .work-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-header,
  .about-grid,
  .problem-grid,
  .three-column-grid,
  .two-column-grid,
  .steps{
    grid-template-columns: 1fr;
  }

  .about-visual img{
    min-height: 240px;
  }

  .tagline{
    width: 100%;
  }
}

@media (max-width: 720px){
  header{ 
    flex-wrap: wrap; 
    gap: 16px; 
  }
  
  nav{ 
    gap: 20px; 
    font-size: 14px; 
  }
  
  .hero-content{ 
    padding: 100px 6% 60px; 
  }

  .work-grid{
    grid-template-columns: 1fr;
  }
  
  footer{ 
    padding-left: 6%; 
    padding-right: 6%;
  }
  
  .actions{ 
    flex-wrap: wrap; 
  }
}
