/* ==========================================================================
   Kestrel — Architecture & Interior Studio Template
   ========================================================================== */

:root{
  /* Color tokens */
  --ink:        #14171A;
  --ink-panel:  #1B1F22;
  --ink-line:   rgba(237,234,227,0.14);
  --paper:      #EDEAE3;
  --paper-line: rgba(20,23,26,0.12);
  --stone:      #8B8577;
  --stone-dark: #5C584D;
  --brass:      #C9A227;
  --brass-dim:  #9C8225;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-s: 2px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p{ margin: 0; }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Subtle film-grain overlay for texture, purely decorative */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-light{
  background: var(--paper);
  color: var(--ink);
}
.btn-light:hover{
  background: var(--brass);
  color: var(--ink);
}
.btn-outline{
  border-color: currentColor;
  background: transparent;
}
.hero .btn-outline{ color: var(--paper); }
.hero .btn-outline:hover{
  background: var(--paper);
  color: var(--ink);
}

.text-link{
  position: relative;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}
.text-link:hover{ color: var(--brass-dim); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 26px 0;
  transition: padding .3s var(--ease), background-color .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header.is-scrolled{
  padding: 16px 0;
  background: rgba(20,23,26,0.72);
  backdrop-filter: blur(10px);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo{
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--paper);
  letter-spacing: 0.01em;
}
.main-nav{
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 0.92rem;
}
.main-nav a{
  color: var(--paper);
  opacity: 0.82;
  transition: opacity .2s var(--ease);
}
.main-nav a:hover{ opacity: 1; }
.nav-cta{
  opacity: 1 !important;
  padding: 10px 20px;
  border: 1px solid rgba(237,234,227,0.4);
  border-radius: var(--radius-s);
}
.nav-cta:hover{
  background: var(--paper);
  color: var(--ink) !important;
  border-color: var(--paper);
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span{
  display: block;
  height: 1px;
  width: 100%;
  background: var(--paper);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  overflow: hidden;
}
.hero-media{
  position: absolute;
  inset: 0;
}
.hero-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,23,26,0.35) 0%, rgba(20,23,26,0.15) 40%, rgba(20,23,26,0.88) 100%);
}
.hero-inner{
  position: relative;
  padding-top: 160px;
  padding-bottom: 120px;
}
.hero-title{
  font-size: clamp(2.6rem, 6vw, 5rem);
  max-width: 14ch;
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s var(--ease) .15s forwards;
}
.hero-sub{
  margin-top: 26px;
  max-width: 46ch;
  font-size: 1.05rem;
  color: rgba(237,234,227,0.85);
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s var(--ease) .35s forwards;
}
.hero-actions{
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s var(--ease) .5s forwards;
}
@keyframes rise{
  to{ opacity: 1; transform: translateY(0); }
}

.scroll-cue{
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 54px;
  z-index: 2;
}
.scroll-cue span{
  display: block;
  width: 1px;
  height: 100%;
  background: rgba(237,234,227,0.5);
  position: relative;
  overflow: hidden;
}
.scroll-cue span::after{
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--paper);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip{
  0%{ top: -100%; }
  60%{ top: 100%; }
  100%{ top: 100%; }
}

/* ==========================================================================
   Intro strip
   ========================================================================== */
.intro{
  padding: 96px 0;
  border-bottom: 1px solid var(--paper-line);
}
.intro-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.intro-lead{
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 400;
  max-width: 34ch;
  color: var(--stone-dark);
}
.intro-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
}
.intro-stats dt{
  font-size: 0.82rem;
  color: var(--stone);
  margin-bottom: 8px;
}
.intro-stats dd{
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--ink);
}

/* ==========================================================================
   Section head (shared)
   ========================================================================== */
.section-head{
  padding-top: 110px;
  padding-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2{
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}
.section-head p{
  max-width: 34ch;
  color: var(--stone-dark);
}

/* ==========================================================================
   Work grid
   ========================================================================== */
.work{ padding-bottom: 110px; }
.work-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  padding: 0 var(--gutter);
  max-width: var(--wrap);
  margin: 0 auto;
}
.work-item--wide{ grid-column: span 2; }
.work-media{
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--stone);
}
.work-item--wide .work-media{ aspect-ratio: 16 / 9; }
.work-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.work-item:hover .work-media img{
  transform: scale(1.05);
}
.work-meta{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--paper-line);
  flex-wrap: wrap;
}
.work-meta h3{
  font-size: 1.15rem;
  font-weight: 500;
}
.work-meta span{
  font-size: 0.85rem;
  color: var(--stone);
  text-align: right;
}
.work-more{
  margin-top: 48px;
}

/* ==========================================================================
   Approach
   ========================================================================== */
.approach{
  background: var(--ink);
  color: var(--paper);
  padding: 120px 0;
}
.approach-grid{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
}
.approach-copy h2{
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  max-width: 12ch;
}
.approach-copy p{
  margin-top: 22px;
  color: rgba(237,234,227,0.7);
  max-width: 36ch;
}
.approach-steps{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.approach-steps li{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink-line);
}
.approach-steps li:first-child{ padding-top: 0; }
.step-index{
  font-family: var(--font-display);
  color: var(--brass);
  font-size: 1.1rem;
}
.approach-steps h3{
  font-size: 1.15rem;
  color: var(--paper);
  margin-bottom: 8px;
}
.approach-steps p{
  color: rgba(237,234,227,0.65);
  max-width: 44ch;
}

/* ==========================================================================
   Studio
   ========================================================================== */
.studio{ padding: 120px 0; }
.studio-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.studio-media{
  aspect-ratio: 4/5;
  overflow: hidden;
}
.studio-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-copy h2{
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  max-width: 14ch;
}
.studio-copy p{
  margin-top: 22px;
  color: var(--stone-dark);
  max-width: 46ch;
}
.studio-copy .text-link{
  display: inline-block;
  margin-top: 8px;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services{ padding-bottom: 120px; }
.services-list{
  border-top: 1px solid var(--paper-line);
}
.service-row{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 34px 0;
  border-bottom: 1px solid var(--paper-line);
}
.service-row h3{
  font-size: 1.25rem;
  font-weight: 500;
}
.service-row p{
  color: var(--stone-dark);
  max-width: 50ch;
}

/* ==========================================================================
   CTA / Contact
   ========================================================================== */
.cta{
  background: var(--ink-panel);
  color: var(--paper);
  padding: 130px 0;
}
.cta-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.cta-copy h2{
  font-size: clamp(2.2rem, 4vw, 3rem);
  max-width: 12ch;
}
.cta-copy p{
  margin-top: 22px;
  color: rgba(237,234,227,0.7);
  max-width: 40ch;
}
.cta-contact{
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
}
.cta-contact a{
  width: fit-content;
  border-bottom: 1px solid transparent;
}
.cta-contact a:hover{
  border-color: currentColor;
}
.cta-contact span{
  color: rgba(237,234,227,0.55);
}

.cta-form{
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label{
  font-size: 0.85rem;
  color: rgba(237,234,227,0.65);
}
.form-row input,
.form-row textarea{
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-line);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 2px;
  resize: vertical;
  transition: border-color .2s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus{
  border-color: var(--brass);
}
.cta-form .btn{
  margin-top: 8px;
  align-self: flex-start;
}
.form-note{
  font-size: 0.85rem;
  color: var(--brass);
  min-height: 1.2em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--ink);
  color: var(--paper);
  padding-top: 70px;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--ink-line);
}
.logo--footer{ font-size: 1.5rem; }
.footer-nav{
  display: flex;
  gap: 26px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.footer-nav a{ opacity: 0.75; }
.footer-nav a:hover{ opacity: 1; }
.footer-social{
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}
.footer-social a{ opacity: 0.75; }
.footer-social a:hover{ opacity: 1; }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 0;
  font-size: 0.8rem;
  color: rgba(237,234,227,0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px){
  .intro-grid{ grid-template-columns: 1fr; gap: 40px; }
  .approach-grid,
  .studio-grid,
  .cta-grid{ grid-template-columns: 1fr; gap: 44px; }
  .studio-media{ order: -1; aspect-ratio: 16/9; }
  .service-row{ grid-template-columns: 1fr; gap: 10px; }
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
  .work-item--wide{ grid-column: span 2; }
}

@media (max-width: 760px){
  .main-nav{
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(78vw, 340px);
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 0 40px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
  }
  .main-nav.is-open{ transform: translateX(0); }
  .main-nav a{ font-size: 1.1rem; opacity: 1; }
  .nav-cta{ margin-top: 10px; }
  .nav-toggle{ display: flex; z-index: 110; }
  .nav-toggle.is-open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2){ opacity: 0; }
  .nav-toggle.is-open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

  .hero-inner{ padding-top: 130px; padding-bottom: 90px; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-actions .btn{ width: 100%; }

  .intro-stats{ grid-template-columns: repeat(3,1fr); gap: 14px; }
  .intro-stats dd{ font-size: 1.6rem; }

  .work-grid{ grid-template-columns: 1fr; }
  .work-item--wide{ grid-column: span 1; }

  .approach-steps li{ grid-template-columns: 40px 1fr; }

  .section-head{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px){
  :root{ font-size: 15px; }
  .cta{ padding: 90px 0; }
  .approach{ padding: 90px 0; }
  .studio{ padding: 90px 0; }
}
