/* ============================================================
   Arquitectoma — Coming soon (LIGHT variant)
   Header + hero stay identical to the dark version (they live over
   a dark photo either way). Only the content sections below switch
   to a light surface. See styles.css for the base/dark version.
   ============================================================ */

:root{
  --black: #0a0a0b;
  --charcoal: #121215;
  --charcoal-2: #1a1a1e;
  --charcoal-3: #202024;
  --off-white: #f4f3ee;
  --white: #fdfdfc;
  --muted: #a3a2a8;
  --muted-2: #6d6c73;
  --blue: #2b3ff5;
  --blue-bright: #5468ff;
  --blue-dim: #1c2a9e;
  --line: rgba(244,243,238,0.09);
  --line-strong: rgba(244,243,238,0.16);

  /* Light-mode content tokens — used only below the hero */
  --page-bg: #f6f4ee;
  --surface: #ffffff;
  --field-bg: #f1efe6;
  --ink: #16171c;
  --ink-muted: #5c5b63;
  --ink-muted-2: #8c8b92;
  --line-light: rgba(22,23,28,0.10);
  --line-light-strong: rgba(22,23,28,0.18);

  --font-display: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(24px, 5vw, 64px);

  /* Emil Kowalski easing tokens — stronger than default CSS easings */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease: var(--ease-out);
  --header-h: 84px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  /* Keep gentle opacity fades; strip motion/transform-driven animation */
  *{ animation-iteration-count: 1 !important; }
  .reveal{ transform: none !important; transition: opacity .3s ease !important; }
  .badge-dot, .scroll-cue-line i, .project-media img, .btn, .stat-num{
    animation: none !important; transition-duration: .001ms !important;
  }
  .btn:active{ transform: none !important; }
}

body{
  margin:0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font: inherit; color: inherit; }

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

.skip-link{
  position:absolute; left:-999px; top:0; z-index: 999;
  background: var(--blue); color:#fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left:0; }

/* ---------- grain overlay ---------- */
.noise-overlay{
  position: fixed; inset:0; z-index: 500; pointer-events:none;
  opacity: .025; mix-blend-mode: multiply;
  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");
}

/* ---------- eyebrow / headings ---------- */
.eyebrow{
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin: 0 0 18px;
}

h1{ font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--white); }
h2, h3{ font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
em{ font-style: normal; font-weight: 500; color: var(--blue-bright); }

/* ============================================================
   Header — unchanged: it floats over the (always dark) hero photo
   ============================================================ */
.site-header{
  position: fixed; inset: 0 0 auto 0; z-index: 400;
  height: var(--header-h);
  display:flex; align-items:center;
  background: linear-gradient(to bottom, rgba(10,10,11,.75), transparent);
  transition: background .3s var(--ease-out), backdrop-filter .3s var(--ease-out), border-color .3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled{
  background: rgba(10,10,11,.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  width:100%;
}
.brand-logo{ height: 17px; width:auto; }

.main-nav{
  display:flex; gap: 40px;
  position:absolute; left:50%; transform:translateX(-50%);
}
.main-nav a{
  font-size: 14px; font-weight: 500; color: var(--muted);
  position:relative; padding: 6px 0;
  transition: color .25s var(--ease);
}
.main-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background: var(--blue-bright);
  transition: right .3s var(--ease);
}
@media (hover: hover) and (pointer: fine){
  .main-nav a:hover{ color: var(--white); }
  .main-nav a:hover::after{ right:0; }
}
.main-nav a.is-active{ color: var(--blue-bright); }
.main-nav a.is-active::after{ right:0; }

.header-actions{ display:flex; align-items:center; gap:20px; }

.badge-pill{
  display:inline-flex; align-items:center; gap:8px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: rgba(255,255,255,.1);
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 24px 7px 28px;
  white-space: nowrap;
  cursor: default;
}
.badge-dot{
  width:6px; height:6px; border-radius:50%;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(253,253,252,.25);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot{
  0%,100%{ opacity:1; transform: scale(1); }
  50%{ opacity:.55; transform: scale(.85); }
}
.header-badge{ display:none; }
@media (min-width: 860px){ .header-badge{ display:inline-flex; } }

.nav-toggle{
  display:flex; flex-direction:column; justify-content:center; gap:5px;
  width: 40px; height: 40px; background:none; border:none; cursor:pointer;
}
.nav-toggle span{ display:block; width: 20px; height:1.5px; background: var(--white); margin-inline:auto; transition: transform .3s var(--ease), opacity .3s var(--ease); }
@media (min-width: 860px){ .nav-toggle{ display:none; } }

@media (max-width: 859px){
  .main-nav{
    position: fixed; top: var(--header-h); left:0; right:0;
    flex-direction: column; gap: 0;
    background: rgba(10,10,11,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden; pointer-events:none;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .main-nav.is-open{ opacity:1; transform: translateY(0); visibility: visible; pointer-events:auto; }
  .main-nav a{ padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-toggle.is-open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2){ opacity:0; }
  .nav-toggle.is-open span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  padding: 15px 28px; border-radius: 999px; border: 1px solid transparent;
  cursor:pointer; white-space:nowrap;
  transition: transform 160ms var(--ease-out), background .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), color .25s var(--ease-out);
}
.btn-primary{
  background: var(--blue); color:#fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 8px 24px -8px rgba(43,63,245,.7);
}
@media (hover: hover) and (pointer: fine){
  .btn-primary:hover{ background: var(--blue-bright); box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 12px 32px -8px rgba(43,63,245,.85); transform: translateY(-2px); }
}
.btn:active{ transform: scale(.97); transition-duration: 100ms; }
.btn-block{ width:100%; }

/* ============================================================
   Hero — unchanged: dark photo, white text, in both variants
   ============================================================ */
.hero{
  position: relative;
  min-height: 100svh;
  display:flex; align-items:center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero-media{ position:absolute; inset:0; z-index:0; }
.hero-media img{ width:100%; height:100%; object-fit: cover; object-position: center 40%; }
.hero-scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(8,8,9,.55) 0%, rgba(8,8,9,.35) 30%, rgba(8,8,9,.55) 68%, rgba(8,8,9,.97) 100%),
    linear-gradient(90deg, rgba(8,8,9,.55) 0%, rgba(8,8,9,.1) 45%, rgba(8,8,9,.05) 100%);
}
.hero-grain{ position:absolute; inset:0; backdrop-filter: contrast(1.05) saturate(1.05); }

.hero-inner{ position:relative; z-index:2; margin-top: clamp(40px, 8vw, 90px); }
.hero-title{
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  font-weight: 700;
  line-height: .96;
  max-width: 14ch;
}
.hero-sub{
  margin: 28px 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--off-white);
  opacity: .82;
  line-height: 1.6;
}

.scroll-cue{
  position:absolute; right: var(--gutter); bottom: 36px; z-index:2;
  display:flex; flex-direction:row; align-items:stretch; gap:12px;
}
.scroll-cue-icon{
  width:auto; aspect-ratio: 184 / 135; color: var(--blue); flex-shrink:0;
  margin-right: 5px;
}
.scroll-cue-word{
  writing-mode: vertical-rl;
  font-size: 11px; letter-spacing:.18em; text-transform:uppercase; color: var(--muted);
}
.scroll-cue-line{ width:1px; background: var(--line-strong); position:relative; overflow:hidden; }
.scroll-cue-line i{
  position:absolute; top:-100%; left:0; width:100%; height:100%; background: var(--blue-bright);
  animation: cue-fall 2.6s var(--ease-in-out) infinite;
}
@keyframes cue-fall{ 0%{ top:-100%; } 35%{ top:100%; } 100%{ top:100%; } }
@media (max-width: 640px){ .scroll-cue{ display:none; } }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal{ opacity:0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible{ opacity:1; transform: translateY(0); }
.hero .reveal{ transition-delay: calc(var(--d, 0) * 90ms); }
.hero-title.reveal{ --d: 1; }
.hero-sub.reveal{ --d: 2; }

/* ============================================================
   About / stats
   ============================================================ */
.about{ background: var(--page-bg); padding-top: clamp(80px, 12vw, 148px); }
.about-grid{
  display:grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px,6vw,96px);
  padding-bottom: clamp(64px, 10vw, 120px);
}
.about-head h2{ font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; margin-bottom: 16px; }
.about-body p{
  color: var(--ink-muted); font-size: 1.05rem; line-height: 1.7; margin: 0 0 20px;
  max-width: 46ch;
}
.about-body p:last-child{ margin-bottom:0; }
@media (max-width: 780px){
  .about-grid{ grid-template-columns: 1fr; gap: 28px; }
}

.stats-band{ background: var(--surface); border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.stats-grid{
  display:flex; flex-wrap:wrap; justify-content:space-between;
  gap: 32px clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 56px);
}
.stat{
  flex: 0 0 auto;
  display:flex; flex-direction:column; gap:10px;
  padding-left: 18px;
  border-left: 1px solid var(--line-light-strong);
}
.stat-num{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  color: var(--ink); letter-spacing:-0.02em; line-height:1;
}
.stat-num::before{ content: attr(data-prefix); color: var(--blue-bright); }
.stat-label{ font-size: 13px; color: var(--ink-muted); line-height:1.4; }

.stats-grid .stat{ transition-delay: calc(var(--i, 0) * 60ms); }
.stat:nth-child(1){ --i: 0; } .stat:nth-child(2){ --i: 1; } .stat:nth-child(3){ --i: 2; }
.stat:nth-child(4){ --i: 3; } .stat:nth-child(5){ --i: 4; }

/* ============================================================
   Projects
   ============================================================ */
.projects{ background: var(--page-bg); padding-block: clamp(88px, 12vw, 156px); }
.section-head{ max-width: 640px; margin-bottom: clamp(48px, 7vw, 76px); }
.section-head h2{ font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; }
.section-sub{ color: var(--ink-muted); font-size: 1.02rem; margin-top: 18px; max-width: 52ch; }

.project-grid{
  display:grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 32px);
}
.project-card{
  position: relative; border-radius: 14px; overflow:hidden;
  background: var(--surface);
  border: 1px solid var(--line-light);
  box-shadow: 0 1px 2px rgba(22,23,28,.04), 0 12px 28px -16px rgba(22,23,28,.16);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.project-card:nth-child(1){ --i: 0; } .project-card:nth-child(2){ --i: 1; }
.project-card:nth-child(3){ --i: 2; } .project-card:nth-child(4){ --i: 3; }

.project-media{
  aspect-ratio: 4 / 3; overflow:hidden;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--ease-out);
}
.project-card.reveal .project-media{ clip-path: inset(0 0 100% 0); }
.project-card.reveal.is-visible .project-media{
  clip-path: inset(0 0 0 0);
  transition-delay: calc(100ms + var(--i, 0) * 90ms);
}

.project-media-trigger{
  display:block; width:100%; height:100%; padding:0; margin:0; border:0;
  background:none; cursor: zoom-in; position:relative;
}
.project-media-trigger:focus-visible{ outline: 2px solid var(--blue-bright); outline-offset: -3px; }
.project-media-trigger::before{
  content:""; position:absolute; inset:0; z-index:1;
  background: rgba(8,8,9,.28);
  opacity:0; transition: opacity .3s var(--ease-out);
}
.project-media-trigger::after{
  content:""; position:absolute; top:50%; left:50%; z-index:2;
  width:40px; height:40px; margin:-20px 0 0 -20px; border-radius:50%;
  background: var(--blue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath d='M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14ZM21 21l-5.6-5.6' stroke='%23ffffff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  opacity:0; transform: scale(.85); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine){
  .project-media-trigger:hover::before,
  .project-media-trigger:focus-visible::before{ opacity:1; }
  .project-media-trigger:hover::after,
  .project-media-trigger:focus-visible::after{ opacity:1; transform: scale(1); }
}

.project-media img{
  width:100%; height:100%; object-fit:cover;
  filter: saturate(.92) contrast(1.02);
  transform: scale(1.12);
  opacity: 0;
  transition: transform .9s var(--ease-out), opacity .8s var(--ease-out), filter .5s var(--ease-out);
}
.project-card.reveal.is-visible .project-media img{
  transform: scale(1);
  opacity: 1;
  transition-delay: calc(160ms + var(--i, 0) * 90ms);
}
@media (hover: hover) and (pointer: fine){
  .project-card:hover .project-media img{ transform: scale(1.06); transition-delay: 0ms; }
}
.project-info{ padding: 24px 26px 28px; }
.project-info h3{ font-size: 1.4rem; font-weight: 600; margin-bottom: 6px; }
.project-location{ font-family: var(--font-mono); color: var(--blue-bright); font-size: 12.5px; font-weight: 500; margin: 0 0 12px; }
.project-meta{ font-family: var(--font-mono); color: var(--ink-muted); font-size: 12.5px; margin:0; }

@media (max-width: 720px){
  .project-grid{ grid-template-columns: 1fr; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact{
  position: relative; overflow:hidden;
  background: var(--page-bg);
  padding-block: clamp(88px, 12vw, 156px);
  border-top: 1px solid var(--line-light);
}
.contact-grid{
  position: relative; z-index:1;
  display:grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 7vw, 100px);
}
.contact-head h2{ font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 20px; }
.contact-intro{ color: var(--ink-muted); font-size: 1.02rem; line-height:1.7; max-width: 44ch; margin: 0 0 40px; }

.contact-info{ display:flex; flex-direction:column; gap: 22px; }
.contact-info li{ font-size: .96rem; color: var(--ink); line-height:1.55; }
.contact-info a{ transition: color .25s var(--ease); }
.contact-info a:hover{ color: var(--blue-bright); }
.contact-info-label{
  display:block; font-size: 11.5px; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; color: var(--ink-muted-2); margin-bottom: 6px;
}

.contact-form{
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 44px);
  display:flex; flex-direction:column; gap: 22px;
  box-shadow: 0 1px 2px rgba(22,23,28,.04), 0 20px 40px -24px rgba(22,23,28,.18);
}
.hp-field{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.form-row{ display:flex; flex-direction:column; gap:8px; }
.form-row-split{ display:grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 520px){ .form-row-split{ grid-template-columns: 1fr; } }

.contact-form label{ font-size: 12.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color: var(--ink-muted); }

.contact-form input,
.contact-form select,
.contact-form textarea{
  width:100%; background: var(--field-bg); border: 1px solid var(--line-light-strong);
  border-radius: 10px; padding: 14px 16px; color: var(--ink);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
  appearance: none;
}
.contact-form select{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c5b63' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.contact-form textarea{ resize: vertical; min-height: 110px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder{ color: var(--ink-muted-2); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  outline:none; border-color: var(--blue-bright); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(84,104,255,.14);
}
.contact-form input:invalid:not(:placeholder-shown){ border-color: #c23f38; }

.btn-spinner{
  width:15px; height:15px; border-radius:50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color:#fff;
  display:none; animation: spin .7s linear infinite;
}
.contact-form.is-loading .btn-spinner{ display:inline-block; }
.contact-form.is-loading .btn-label{ opacity:.7; }
@keyframes spin{ to{ transform: rotate(360deg); } }

.form-status{ margin:0; font-size: 13.5px; min-height: 18px; }
.form-status.ok{ color: #1e8a5f; }
.form-status.err{ color: #c23f38; }

@media (max-width: 860px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer{ background: var(--page-bg); border-top: 1px solid var(--line-light); }
.footer-inner{
  display:flex; align-items:center; justify-content:space-between; gap: 20px;
  padding-block: 32px;
  font-size: 13px; color: var(--ink-muted-2);
}
.footer-mark{ opacity:.85; }
.footer-top{ transition: color .25s var(--ease); }
@media (hover: hover) and (pointer: fine){
  .footer-top:hover{ color: var(--blue-bright); }
}
@media (max-width: 560px){
  .footer-inner{ flex-direction:column; text-align:center; }
}

/* ============================================================
   Lightbox — stays dark-chrome regardless of site theme
   (photo viewers conventionally use a dark surround)
   ============================================================ */
.lightbox{
  position: fixed; inset:0; z-index: 900;
  display:flex; align-items:center; justify-content:center;
  padding: clamp(24px, 6vw, 72px);
}
.lightbox[hidden]{ display:none; }
.lightbox-backdrop{
  position:absolute; inset:0; background: rgba(6,6,7,.92);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity:0; transition: opacity .25s var(--ease-out);
}
.lightbox.is-open .lightbox-backdrop{ opacity:1; }
.lightbox-img{
  position:relative; z-index:1;
  max-width:100%; max-height:100%; width:auto; height:auto;
  border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  opacity:0; transform: scale(.96);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.lightbox.is-open .lightbox-img{ opacity:1; transform: scale(1); }
.lightbox-close{
  position:absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); z-index:2;
  width:44px; height:44px; border-radius:50%; border:1px solid var(--line-strong);
  background: rgba(18,18,21,.7); color: var(--white);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background .25s var(--ease-out), transform 160ms var(--ease-out), border-color .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine){
  .lightbox-close:hover{ background: rgba(28,28,32,.9); border-color: var(--white); }
}
.lightbox-close:active{ transform: scale(.93); }
