/* Voton Phase, L3C — site styles */

:root {
  --bg: #0a0812;
  --bg-soft: #12101a;
  --bg-card: #18141f;
  --bg-header: rgba(10, 8, 18, 0.84);
  --text: #f1e9dc;
  --text-muted: #b9b1a4;
  --accent: #e5b07a;
  --accent-hover: #f0c49a;
  --accent-ink: #1a1208;
  --line: rgba(226, 210, 240, 0.14);
  --line-strong: rgba(226, 210, 240, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  --violet: #7a5cff;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --space: clamp(1.25rem, 4vw, 2.75rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --wide: 70rem;
  --measure: 40rem;
  --radius: 1rem;
  --header-h: 4.25rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(122, 92, 255, 0.10), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 20%, rgba(90, 60, 160, 0.12), transparent 50%),
    radial-gradient(ellipse 30% 25% at 0% 70%, rgba(229, 176, 122, 0.05), transparent 50%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: rgba(229, 176, 122, 0.32);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 0.4rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(var(--wide), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

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

.logo-mark {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
}

.logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.nav-soon {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(92vh, 54rem);
  padding: clamp(5.5rem, 14vw, 9rem) 0 clamp(3.5rem, 9vw, 6.5rem);
  text-align: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

@media (max-width: 800px) {
  .hero-media img {
    object-position: center;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 8, 18, 0.42) 0%, rgba(10, 8, 18, 0.58) 36%, rgba(10, 8, 18, 0.80) 72%, var(--bg) 100%),
    linear-gradient(to right, rgba(10, 8, 18, 0.34), rgba(10, 8, 18, 0.14) 50%, rgba(10, 8, 18, 0.38)),
    radial-gradient(ellipse 75% 55% at 50% 42%, rgba(10, 8, 18, 0.28), transparent 70%);
}

.hero .btn-ghost {
  background: rgba(10, 8, 18, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 28px rgba(10, 8, 18, 0.85), 0 4px 56px rgba(10, 8, 18, 0.7);
}

.lede {
  margin: 0 auto 2.25rem;
  max-width: 22em;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: #dcd4c6;
  text-shadow: 0 1px 18px rgba(10, 8, 18, 0.85), 0 2px 36px rgba(10, 8, 18, 0.65);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.phase-motif {
  width: min(36rem, 100%);
  margin: 0 auto;
  color: var(--accent);
  opacity: 0.9;
}

/* Sections
   ========================================================================== */

.section {
  padding: clamp(3.25rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 1.08rem;
}

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

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* What we do
   ========================================================================== */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.75rem;
}

.offer {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  min-height: 100%;
}

.offer-num {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.offer h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.offer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Work gallery
   ========================================================================== */

.portfolio-intro {
  max-width: var(--measure);
  margin: 0 0 2.25rem;
  color: var(--text-muted);
}

.gallery {
  --row-h: 230px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.gallery::after {
  content: "";
  flex-grow: 1000;
}

.gallery li {
  margin: 0;
  flex-grow: calc(var(--ar) * 100);
  flex-basis: calc(var(--ar) * var(--row-h));
  min-width: 0;
}

.gallery-link {
  display: block;
  border-radius: calc(var(--radius) - 0.15rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: inherit;
  text-decoration: none;
}

.gallery-link:hover img,
.gallery-link:focus-visible img {
  transform: scale(1.03);
}

.gallery-item {
  margin: 0;
}

.gallery-item figcaption {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gallery-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

/* White Vectorworks sheets need a warm mat and a firmer edge on the dark page */
.gallery-plots .gallery-link {
  background: #e4dfd6;
  border: 1px solid rgba(226, 210, 240, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  padding: 0.3rem;
}

.gallery-plots .gallery-link img {
  border-radius: 0.15rem;
}

#plots-heading {
  max-width: 26ch;
}

/* Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 3.5rem 0.75rem 1.5rem;
  background: rgba(8, 6, 16, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-height: 100%;
}

.lightbox-figure img {
  max-width: min(92vw, 1800px);
  max-height: calc(100vh - 7.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.35rem;
}

.lightbox-figure figcaption {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 2rem;
  border-radius: 999px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 2.4rem;
  border-radius: 999px;
  flex-shrink: 0;
}

body.lightbox-open {
  overflow: hidden;
}

/* Contact
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-copy .prose {
  margin-bottom: 1.25rem;
}

.email-link {
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-word;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  padding: 1.5rem 1.4rem 1.4rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  padding: 0.7rem 0.8rem;
  caret-color: var(--accent);
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(229, 176, 122, 0.45);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form .btn {
  justify-self: start;
  border: 0;
}

/* Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.25rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-soon {
  color: var(--text-muted);
}

/* 404
   ========================================================================== */

.page-error {
  min-height: calc(100vh - var(--header-h) - 6rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(3rem, 10vw, 6rem) 0;
}

.page-error .phase-motif {
  margin-bottom: 2rem;
  width: min(20rem, 100%);
}

.page-error h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-error p {
  margin: 0 auto 1.75rem;
  max-width: 28em;
  color: var(--text-muted);
}

/* Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .offer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .gallery {
    --row-h: 190px;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-block: 0.85rem;
    min-height: 0;
    gap: 0.7rem;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 0.35rem 1.1rem;
  }

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

  .gallery {
    --row-h: 130px;
    gap: 0.4rem;
  }

  .lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 3.25rem 0.75rem 0.75rem;
  }

  .lightbox-figure {
    grid-row: 1;
    grid-column: 1;
  }

  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    bottom: 0.4rem;
  }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }


  html {
    scroll-padding-top: 7.5rem;
  }
}

/* 3:2 plot sheets go one-up on narrow phones; without this the justified
   leftover spacer would shrink the last tile. Two still fit above ~430px. */
@media (max-width: 430px) {
  .gallery-plots {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-plots::after {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  a,
  .gallery-link img {
    transition: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #d4cdc0;
    --line: rgba(241, 233, 220, 0.4);
    --line-strong: rgba(241, 233, 220, 0.7);
  }

  .offer,
  .contact-form,
  .gallery-link {
    border-width: 2px;
  }
}
