/* ===================================================================
   ASA ARCHITECTS — Design System
   Ultra-minimal · Editorial · Luxury Architecture
   =================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:          #F5F2ED;
  --bg-warm:     #EDE9E1;
  --text:        #1A1A1A;
  --text-muted:  #6B6560;
  --accent:      #C4B8A8;
  --accent-dark: #A89A88;
  --border:      #D9D3CA;
  --white:       #FAFAF8;
  --error:       #A24836;
  --bg-scrolled: rgba(245, 242, 237, 0.95);

  /* Typography */
  --serif:     'Cormorant Garamond', 'Georgia', serif;
  --sans:      'Inter', 'Helvetica Neue', sans-serif;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;
  --space-2xl:  10rem;
  --space-3xl:  14rem;

  /* Layout */
  --max-width:  1400px;
  --gutter:     clamp(1.5rem, 4vw, 4rem);

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --duration:   0.6s;
}

html[data-theme="dark"] {
  --bg:          #161614;
  --bg-warm:     #1E1E1C;
  --text:        #EAE5DC;
  --text-muted:  #9A948C;
  --accent:      #5E564E;
  --accent-dark: #8C8074;
  --border:      #2A2824;
  --white:       #1E1E1C;
  --error:       #D36A53;
  --bg-scrolled: rgba(22, 22, 20, 0.95);
}

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

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

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  transition: background-color var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ────────────────────────────────────────────────── */
.heading-xl {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 8vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
}

.heading-lg {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.heading-md {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.heading-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.3;
}

.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.body-lg {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.8;
  color: var(--text-muted);
}

.body-md {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ── Container ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Horizontal Rule ───────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border);
  border: none;
}

/* ===================================================================
   NAVIGATION
   =================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--space-md) 0;
  transition: background-color var(--duration) var(--ease),
              padding var(--duration) var(--ease);
}

.nav.scrolled {
  background-color: var(--bg-scrolled);
  backdrop-filter: blur(4px);
  padding: var(--space-sm) 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  animation: logoReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s forwards;
}

.nav__logo-img {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

.nav__logo-text {
  line-height: 1;
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav__link {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.35s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text);
  transition: width 0.45s var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link.active {
  color: var(--text);
}

.nav__link.active::after {
  width: 100%;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
  outline: none;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 100%;
  height: 100%;
}

/* Hide sun in light theme, hide moon in dark theme */
html[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

html:not([data-theme="dark"]) .theme-toggle .sun-icon {
  display: none;
}

html[data-theme="dark"] .nav__logo-img {
  filter: invert(1);
}

html[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='%23EAE5DC' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform var(--duration) var(--ease);
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s var(--ease);
  z-index: 0;
}

.hero__slide.active {
  opacity: 1;
  z-index: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.05);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 26, 0.55) 0%,
    rgba(26, 26, 26, 0.1) 50%,
    transparent 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gutter) var(--space-xl);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 9vw, 10rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--white);
  max-width: 900px;
}

.hero__subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.6);
  margin-top: var(--space-md);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  right: var(--gutter);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.hero__scroll-text {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.5);
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background-color: rgba(250, 250, 248, 0.3);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  animation: scrollPulse 2s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* Slideshow Navigation Dots & Circular Progress Rings */
.hero__nav {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: var(--space-xs);
}

.hero__dot-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--white);
  outline: none;
  border-radius: 50%;
  transition: opacity 0.3s var(--ease);
}

.hero__dot-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.hero__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--white);
  opacity: 0.35;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero__dot-btn:hover .hero__dot {
  opacity: 0.7;
  transform: scale(1.2);
}

.hero__dot-btn.active .hero__dot {
  opacity: 1;
  transform: scale(1.2);
}

.hero__circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  transform: rotate(-90deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.hero__dot-btn.active .hero__circle {
  opacity: 1;
}

.hero__circle-progress {
  stroke-dasharray: 56.5; /* 2 * PI * r = 2 * 3.14159 * 9 = 56.54 */
  stroke-dashoffset: 56.5;
}

.hero__dot-btn.active .hero__circle-progress {
  animation: heroProgressAnimation 7s linear forwards;
}

@keyframes heroProgressAnimation {
  from {
    stroke-dashoffset: 56.5;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ===================================================================
   STUDIO INTRODUCTION
   =================================================================== */
.studio {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.studio__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.studio__label {
  margin-bottom: var(--space-md);
}

.studio__heading {
  max-width: 600px;
}

.studio__body {
  padding-top: var(--space-sm);
  max-width: 480px;
}

.studio__body p {
  margin-bottom: var(--space-md);
}

.studio__detail {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.studio__detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.studio__detail-value {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.studio__detail-label {
  font-size: 0.65rem;
}

/* ===================================================================
   FEATURED PROJECTS
   =================================================================== */
.projects {
  padding: var(--space-2xl) 0;
}

.projects__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.projects__count {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  font-style: italic;
}

/* Project Category Tabs */
.projects__tabs {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
}

.projects__tab {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.25rem 0 0.4rem;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-bottom-color 0.35s var(--ease);
}

.projects__tab:hover {
  color: var(--text);
}

.projects__tab.active {
  color: var(--text);
  border-bottom: 1px solid var(--text);
}

/* Asymmetric Project Grid */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 5;
}

.project-card__image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-card__image img {
  transition: transform 1.2s var(--ease-out);
}

.project-card:hover .project-card__image img {
  transform: scale(1.04);
}

.project-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg) var(--space-md);
  background: linear-gradient(
    to top,
    rgba(26, 26, 26, 0.6) 0%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.project-card:hover .project-card__info {
  opacity: 1;
  transform: translateY(0);
}

.project-card__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: var(--white);
  letter-spacing: -0.01em;
}

.project-card__meta {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.6);
  margin-top: 0.4rem;
}

.project-card__year {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(250, 250, 248, 0.5);
}

/* ===================================================================
   PROJECT GALLERY MODAL
   =================================================================== */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.gallery-modal.active {
  opacity: 1;
  visibility: visible;
}

body.gallery-open {
  overflow: hidden;
}

.gallery-modal__close {
  position: fixed;
  top: var(--space-md);
  right: var(--gutter);
  z-index: 210;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--text-muted);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s var(--ease);
}

.gallery-modal__close:hover {
  color: var(--text);
}

.gallery-modal__header {
  padding: var(--space-3xl) var(--gutter) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-modal__title {
  margin-bottom: 0.5rem;
}

.gallery-modal__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.gallery-modal__grid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Gallery Sub-Project Sections */
.gallery-project {
  padding-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-top: 1px solid var(--border);
}

.gallery-project:first-child {
  border-top: none;
  padding-top: 0;
}

.gallery-project__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.gallery-project__location {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.gallery-project__images {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.gallery-project__images img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ===================================================================
   SERVICES
   =================================================================== */
.services {
  padding: var(--space-2xl) 0;
  background-color: var(--bg-warm);
}

.services__header {
  margin-bottom: var(--space-xl);
}

.services__list {
  border-top: 1px solid var(--border);
}

.service-item {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  cursor: default;
  transition: padding 0.4s var(--ease);
}

.service-item:hover {
  padding-left: var(--space-sm);
}

.service-item__number {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--accent-dark);
  padding-top: 0.15rem;
}

.service-item__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.service-item__desc {
  max-width: 380px;
}

/* ===================================================================
   STATISTICS
   =================================================================== */
.stats {
  padding: var(--space-2xl) 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  text-align: left;
}

.stat {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.stat__number {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.stat__label {
  font-size: 0.65rem;
  max-width: 160px;
}

/* ===================================================================
   FOUNDER SECTION
   =================================================================== */
.founder {
  padding: var(--space-2xl) 0;
  background-color: var(--bg);
}

.founder__grid {
  display: grid;
  grid-template-columns: 4.5fr 7.5fr;
  gap: var(--space-2xl);
  align-items: center;
}

.founder__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--border);
}

.founder__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.founder__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.founder__label {
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}

.founder__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

.founder__title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.founder__quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 var(--space-xl) 0;
  position: relative;
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: var(--space-md);
}

.founder__link-more {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.founder__link-more:hover {
  color: var(--text-muted);
  border-color: transparent;
}

/* ===================================================================
   CONTACT CTA
   =================================================================== */
/* ===================================================================
   CONTACT SECTION & FORM
   =================================================================== */
.contact {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
}

.contact__label {
  margin-bottom: var(--space-md);
}

.contact__heading {
  margin: 0 auto;
  max-width: 800px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  text-align: left;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contact-info__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-start;
}

.contact-info__label {
  color: var(--text-muted);
}

.contact-info__value {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
}

.contact-info__value.tel,
.contact-info__value.email {
  align-self: flex-start;
  transition: opacity 0.3s var(--ease);
}

.contact-info__value.tel:hover,
.contact-info__value.email:hover {
  opacity: 0.7;
}

.maps-link {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  margin-top: 4px;
}

.maps-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.contact-socials__list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin-top: var(--space-xs);
}

/* Form Styling */
.contact-form-container {
  border-left: 1px solid var(--border);
  padding-left: var(--space-2xl);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-control {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  color: var(--text);
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s var(--ease);
}

.form-control:focus {
  border-bottom-color: var(--text);
}

.form-control::placeholder {
  color: var(--text);
  opacity: 0.3;
}

.form-select {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  color: var(--text);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 20px;
}

.form-select:focus {
  border-bottom-color: var(--text);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-control.error {
  border-bottom-color: var(--error);
}

.form-control:focus-visible {
  border-bottom-color: var(--text);
  outline: none;
}

.error-message {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--error);
  margin-top: 2px;
}

.field-error {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--error);
  margin-top: 4px;
}

.contact-form__submit {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--text);
  padding: 1.1rem 3.5rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), opacity 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  outline: none;
}

.contact-form__submit:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.contact-form__submit:hover {
  background-color: var(--text);
  color: var(--bg);
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-xl) 0;
  animation: fadeIn 0.6s var(--ease) forwards;
}

.success-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.success-body {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive Grid for Contact Section */
@media (max-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .contact-form-container {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: var(--space-2xl);
  }
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  align-items: center;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 4px;
  color: var(--text-muted);
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
  text-decoration: none;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text);
  transition: width 0.4s var(--ease-out);
}

.social-link:hover {
  color: var(--text);
  opacity: 0.9;
}

.social-link:hover::after {
  width: 100%;
}

/* ===================================================================
   SCROLL REVEAL ANIMATIONS
   =================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out),
              transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.reveal-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero entrance */
.hero__title,
.hero__subtitle {
  opacity: 0;
  transform: translateY(40px);
  animation: heroEntrance 1.2s var(--ease-out) forwards;
}

.hero__subtitle {
  animation-delay: 0.3s;
}

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stat counter animation */
.stat__number.counting {
  transition: none;
}

/* ===================================================================
   ABOUT PAGE Hero & Sections
   =================================================================== */
.about-hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.about-intro {
  padding: var(--space-2xl) 0;
}

.about-intro__grid {
  max-width: 800px;
}

.philosophy {
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: 1px solid var(--border);
}

.philosophy__grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .philosophy__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ===================================================================
   RESPONSIVE — Tablet
   =================================================================== */
@media (max-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .studio__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .studio__body {
    max-width: 560px;
  }

  .service-item {
    grid-template-columns: 40px 1fr;
  }

  .service-item__desc {
    grid-column: 2 / 3;
  }

  .founder__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .founder__image {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ===================================================================
   RESPONSIVE — Small Tablet & Landscape Mobile
   =================================================================== */
@media (max-width: 768px) {
  .stats__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stat {
    text-align: center;
    padding: var(--space-md) 0;
  }

  .stat__label {
    margin: 0 auto;
  }
}

/* ===================================================================
   RESPONSIVE — Mobile
   =================================================================== */
@media (max-width: 640px) {
  .nav__links {
    display: none;
  }

  .hero__content {
    padding-bottom: var(--space-lg);
  }

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

  .project-card {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 3 / 4;
    margin-top: 0;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .service-item__number {
    display: none;
  }

  .contact__details {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .studio__detail {
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}
