/* ==========================================================================
   1. RESET / BASE
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body, h1, h2, h3, p, blockquote, figure, ol, ul {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

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

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

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

/* ==========================================================================
   2. CSS VARIABLES
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #F5F1E8;
  --color-surface: #FAF8F2;
  --color-sage: #DDE4D8;
  --color-beige: #E8D8C8;
  --color-terracotta: #C98F78;
  --color-terracotta-deep: #B97B62;
  --color-text: #30312D;
  --color-text-muted: #74756E;
  --color-border: #DED9CF;

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 48px;
  --radius-full: 999px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 80px;
  --space-3xl: 120px;

  /* Layout */
  --content-padding: 20px;
  --content-max: 1200px;

  /* Typography */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Motion */
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --duration-fast: 250ms;
  --duration-normal: 500ms;
  --duration-slow: 800ms;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h2 {
  font-size: clamp(2rem, 8vw, 3rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 500;
}

p {
  color: var(--color-text);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta-deep);
  margin-bottom: var(--space-sm);
}

/* ==========================================================================
   4. GLOBAL LAYOUT
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-text);
  color: var(--color-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 200;
}

.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

section {
  padding: var(--space-2xl) var(--content-padding);
}

.section-head {
  margin-bottom: var(--space-xl);
  max-width: 34ch;
}

.section-head h2 {
  margin-top: var(--space-xs);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--duration-fast) var(--ease-soft),
              background-color var(--duration-fast) var(--ease-soft);
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-surface);
}

.btn-primary:hover {
  background-color: var(--color-terracotta-deep);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-text);
  min-height: 44px;
}

.link-arrow span {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-soft);
}

.link-arrow:hover span {
  transform: translateX(4px);
}

:focus-visible {
  outline: 2px solid var(--color-terracotta-deep);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   5. HEADER / NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 241, 232, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--content-padding);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-text);
}

.logo-dot {
  color: var(--color-terracotta);
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  min-width: 44px;
  justify-content: flex-end;
  font-weight: 600;
  font-size: 0.95rem;
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.menu-toggle-icon span {
  display: block;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration-fast) var(--ease-soft),
              opacity var(--duration-fast) var(--ease-soft);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  /* Positive (not just non-auto) z-index, and lower than .site-header's,
     so the menu toggle stays visible/tappable as a close affordance above
     the overlay, while still beating any later-in-DOM [data-reveal]
     element — those resolve a non-"none" transform once revealed, which
     creates a stacking context that would otherwise paint above a
     z-index:auto fixed element regardless of visual layering intent. */
  z-index: 90;
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-2xl);
  padding: var(--space-2xl) var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-soft),
              opacity var(--duration-normal) var(--ease-soft);
  visibility: hidden;
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-nav-list a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 2.75rem);
  font-weight: 500;
}

.mobile-nav-cta {
  align-self: flex-start;
}

/* ==========================================================================
   6. HERO
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  overflow: hidden;
}

.hero-copy {
  max-width: 40ch;
}

.hero-heading {
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  margin: 0 0 var(--space-md);
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 32ch;
  margin-bottom: var(--space-lg);
}

.hero-media {
  position: relative;
  margin-inline: calc(var(--content-padding) * -1);
}

.hero-media img {
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.tag-note {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  background-color: rgba(250, 248, 242, 0.9);
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag-note-sep {
  color: var(--color-terracotta);
}

/* ==========================================================================
   7. PROJECTS
   ========================================================================== */

.projects {
  background-color: var(--color-surface);
}

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

.project:last-child {
  margin-bottom: 0;
}

.project-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.project-media img {
  width: 100%;
  transition: transform var(--duration-slow) var(--ease-soft);
}

.project-name {
  margin-bottom: 4px;
}

.project-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.project-desc {
  max-width: 42ch;
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   8. ABOUT / STUDIO
   ========================================================================== */

.studio-media {
  position: relative;
  margin-inline: calc(var(--content-padding) * -1);
  margin-bottom: var(--space-xl);
}

.studio-media-main {
  width: 100%;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.studio-media-accent {
  position: absolute;
  width: 44%;
  bottom: -10%;
  right: var(--content-padding);
  border-radius: var(--radius-md);
  border: 6px solid var(--color-surface);
  box-shadow: 0 12px 32px rgba(48, 49, 45, 0.12);
}

.studio-copy {
  max-width: 46ch;
}

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

.studio-copy p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   9. PHILOSOPHY
   ========================================================================== */

.philosophy {
  position: relative;
  text-align: center;
  background-color: var(--color-sage);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  overflow: hidden;
}

.philosophy .eyebrow {
  position: relative;
  z-index: 1;
}

.philosophy-statement {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 3.25rem);
  line-height: 1.2;
  max-width: 16ch;
  margin: 0 auto var(--space-md);
}

.philosophy-note {
  position: relative;
  z-index: 1;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.philosophy-motif {
  position: absolute;
  opacity: 0.6;
}

.philosophy-motif--arch {
  width: 90px;
  top: 10%;
  left: 5%;
}

.philosophy-motif--blob {
  width: 110px;
  bottom: 8%;
  right: 6%;
}

/* ==========================================================================
   10. SERVICES
   ========================================================================== */

.service-list {
  border-top: 1px solid var(--color-border);
}

.service-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 4px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  min-height: 44px;
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.service-icon {
  font-size: 1.3rem;
  color: var(--color-terracotta);
  transition: transform var(--duration-fast) var(--ease-soft);
  flex-shrink: 0;
}

.service-item[aria-expanded="true"] .service-icon {
  transform: rotate(45deg);
}

.service-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-soft);
}

.service-panel p {
  padding: 0 4px var(--space-md);
  color: var(--color-text-muted);
  max-width: 46ch;
}

/* ==========================================================================
   11. PROCESS
   ========================================================================== */

.process {
  background-color: var(--color-surface);
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.process-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.process-number {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-terracotta);
  flex-shrink: 0;
  padding-top: 2px;
}

.process-step h3 {
  margin-bottom: 4px;
}

.process-step p {
  color: var(--color-text-muted);
  max-width: 40ch;
}

/* ==========================================================================
   12. TESTIMONIALS
   ========================================================================== */

.testimonial {
  text-align: center;
}

.testimonial blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  line-height: 1.3;
  max-width: 20ch;
  margin: 0 auto var(--space-lg);
}

.testimonial footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial cite {
  font-style: normal;
  font-weight: 600;
}

.testimonial footer span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   13. CTA
   ========================================================================== */

.cta {
  text-align: center;
  background-color: var(--color-beige);
  border-radius: var(--radius-xl);
  margin: 0 var(--content-padding) var(--space-2xl);
  padding: var(--space-2xl) var(--content-padding);
}

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

.cta p {
  color: var(--color-text-muted);
  max-width: 32ch;
  margin: 0 auto var(--space-lg);
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.site-footer {
  padding: var(--space-xl) var(--content-padding) var(--space-lg);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
}

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

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   15. ANIMATIONS
   ========================================================================== */

/* Below-the-fold reveal is JS-enhanced only: without .has-js (JS blocked,
   slow, or disabled) content stays visible by default so nothing depends
   on script execution to be seen. */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-soft),
              transform var(--duration-slow) var(--ease-soft);
}

.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero is above the fold on load, so its entrance is CSS-only — it must
   never wait on JavaScript to become visible. */
@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-enter {
  animation: hero-enter var(--duration-slow) var(--ease-soft) both;
}

.hero-enter--delay {
  animation-delay: 120ms;
}

.project-media:hover img,
.project-media:focus-within img {
  transform: scale(1.03);
}

/* ==========================================================================
   16. RESPONSIVE ENHANCEMENTS
   ========================================================================== */

@media (min-width: 768px) {
  :root {
    --content-padding: 40px;
  }

  .header-inner {
    padding: var(--space-md) var(--content-padding);
  }

  .hero {
    padding-top: var(--space-2xl);
  }

  .hero-media img {
    border-radius: var(--radius-lg);
  }

  .projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl) var(--space-lg);
    align-items: start;
  }

  .section-head {
    grid-column: 1 / -1;
  }

  .project:nth-of-type(3) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-xl);
    align-items: center;
  }

  .project:nth-of-type(3) .project-media {
    margin-bottom: 0;
  }

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

  .studio-media,
  .studio-copy {
    margin-bottom: 0;
  }

  .cta {
    margin-inline: var(--content-padding);
  }
}

@media (min-width: 1024px) {
  :root {
    --content-padding: 64px;
  }

  section {
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
  }

  .header-inner {
    padding: var(--space-lg) var(--content-padding);
  }

  .menu-toggle-label {
    display: none;
  }

  .hero {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .hero-copy {
    flex: 0 0 42%;
  }

  .hero-media {
    flex: 1;
    margin-inline: 0;
    align-self: flex-end;
  }

  .hero-media img {
    border-radius: var(--radius-xl);
  }

  .project {
    transition: transform var(--duration-normal) var(--ease-soft);
  }

  .project:hover {
    transform: translateY(-6px);
  }

  .philosophy {
    padding-top: calc(var(--space-3xl) + var(--space-xl));
    padding-bottom: calc(var(--space-3xl) + var(--space-xl));
  }

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

  .service-name {
    font-size: 1.4rem;
  }

  .process-list {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-md);
  }

  .process-step {
    flex-direction: column;
    max-width: 200px;
  }

  .cta {
    padding: var(--space-3xl) var(--space-2xl);
  }

  .footer-top {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .footer-nav {
    flex-direction: row;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

@media (min-width: 1440px) {
  :root {
    --content-padding: 96px;
    --content-max: 1320px;
  }

  .hero-copy {
    flex-basis: 36%;
  }

  .hero-heading {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
  }
}

/* ==========================================================================
   17. ACCESSIBILITY / REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
