/* ==========================================================================
   Vestra Studio — style-sample prototype
   Self-contained: local custom properties only, no shared/global tokens.
   ========================================================================== */

:root {
  /* palette — deep navy / warm brass, no violet-magenta-cyan default */
  --ink: #12181f;
  --ink-soft: #1c242e;
  --paper: #faf7f1;
  --paper-dim: #f1ece1;
  --line: #d9d2c2;
  --gold: #b98f4c;
  --gold-bright: #d4ac6e;
  --text-on-dark: #f4f1ea;
  --text-on-dark-dim: #c9c2b3;
  --text-on-paper: #21262c;
  --text-on-paper-dim: #5b5b52;

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", sans-serif;

  /* rhythm */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text-on-paper);
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.08; }

.section-heading {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  max-width: 34ch;
}

.section-lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-on-paper-dim);
  max-width: 52ch;
}

/* reveal-on-scroll -------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 0.85rem;
  background: var(--ink);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.45);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--gold-bright);
  margin-top: 0.35rem;
  font-weight: 600;
}

.nav-menu { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }

.nav-links { display: flex; gap: clamp(1rem, 2.4vw, 2.1rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-on-dark-dim);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text-on-dark); border-color: var(--gold); }

.nav-cta {
  border: 1px solid var(--gold);
  color: var(--text-on-dark);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.15rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--gold); color: var(--ink); }

.nav-toggle {
  display: none;
  width: 34px; height: 26px;
  border: none; background: transparent;
  padding: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text-on-dark); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,24,31,0.35) 0%, rgba(18,24,31,0.55) 55%, rgba(18,24,31,0.92) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding-block: clamp(6rem, 14vh, 9rem) clamp(3.5rem, 8vh, 5.5rem);
  width: 100%;
}
.hero-eyebrow { color: var(--gold-bright); margin-bottom: 1.1rem; }
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 5rem);
  max-width: 16ch;
}
.hero-title .accent {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-bright);
}
.hero-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-on-dark-dim);
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.95rem 1.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-bright); }
.btn-ghost-dark { border-color: rgba(244,241,234,0.55); color: var(--text-on-dark); }
.btn-ghost-dark:hover { border-color: var(--text-on-dark); background: rgba(244,241,234,0.08); }
.btn-ink { background: var(--ink); color: var(--text-on-dark); }
.btn-ink:hover { background: var(--ink-soft); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.4rem, 4vh, 2.4rem);
  transform: translateX(-50%);
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-on-dark-dim);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.scroll-cue .line { width: 1px; height: 34px; background: rgba(244,241,234,0.4); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: ""; position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%; background: var(--gold-bright);
  animation: scrollpulse 2.1s var(--ease) infinite;
}
@keyframes scrollpulse { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* ==========================================================================
   About / stats
   ========================================================================== */
.about { padding-block: clamp(4.5rem, 10vh, 7.5rem); background: var(--paper); }
.about .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-media::before {
  content: "";
  position: absolute; inset: -14px auto auto -14px;
  width: 64%; height: 64%;
  border: 1px solid var(--gold);
  z-index: -1;
}
.about-copy p { margin-top: 1.1rem; }
.about-stats {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-num .suffix { color: var(--gold); }
.stat-label { font-size: 0.78rem; color: var(--text-on-paper-dim); letter-spacing: 0.03em; margin-top: 0.3rem; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding-block: clamp(4.5rem, 10vh, 7.5rem); background: var(--ink); color: var(--text-on-dark); }
.services .section-heading { color: var(--text-on-dark); }
.services .section-lede { color: var(--text-on-dark-dim); }
.services-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(244,241,234,0.14); }
.service-card {
  position: relative;
  background: var(--ink);
  padding: 2.4rem clamp(1.4rem, 2.5vw, 2.2rem) 2.2rem;
  min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.service-card .service-media {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0.28;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  transform: scale(1.04);
}
.service-card .service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,24,31,0.35), rgba(18,24,31,0.92));
}
.service-card:hover .service-media { opacity: 0.42; transform: scale(1.1); }
.service-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.4rem; color: var(--text-on-dark); }
.service-card p { margin-top: 0.75rem; font-size: 0.92rem; line-height: 1.55; color: var(--text-on-dark-dim); }

/* ==========================================================================
   Portfolio
   ========================================================================== */
.portfolio { padding-block: clamp(4.5rem, 10vh, 7.5rem); background: var(--paper); }
.portfolio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 6vh, 3.5rem); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.9rem, 1.6vw, 1.4rem); }
.portfolio-item { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink); }
.portfolio-item:nth-child(1) { grid-row: span 2; aspect-ratio: 4 / 7; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem;
  background: linear-gradient(0deg, rgba(18,24,31,0.85) 0%, rgba(18,24,31,0) 55%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay .cat { color: var(--gold-bright); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.portfolio-overlay .name { color: var(--text-on-dark); font-family: var(--font-display); font-size: 1.2rem; margin-top: 0.3rem; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { padding-block: clamp(4.5rem, 10vh, 7.5rem); background: var(--paper-dim); }
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2rem); margin-top: clamp(2.5rem, 6vh, 3.5rem); counter-reset: step; }
.process-step { position: relative; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.process-step .step-num { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); display: block; margin-bottom: 0.9rem; }
.process-step h3 { font-size: 1.1rem; }
.process-step p { margin-top: 0.6rem; font-size: 0.92rem; line-height: 1.55; color: var(--text-on-paper-dim); }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials { padding-block: clamp(4.5rem, 10vh, 7.5rem); background: var(--paper); }
.testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2.5rem, 6vh, 3.5rem); }
.testimonial-card { background: var(--ink); color: var(--text-on-dark); padding: clamp(1.8rem, 3vw, 2.6rem); border-radius: var(--radius); }
.testimonial-card .quote-mark { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 0.6rem; }
.testimonial-card p.quote { font-size: 1.05rem; line-height: 1.6; }
.testimonial-person { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.6rem; }
.avatar-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink-soft);
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.95rem; color: var(--gold-bright);
  flex-shrink: 0;
}
.testimonial-person .who strong { display: block; font-size: 0.9rem; color: var(--text-on-dark); }
.testimonial-person .who span { font-size: 0.78rem; color: var(--text-on-dark-dim); }
.testimonial-note { margin-top: 1.4rem; font-size: 0.76rem; color: var(--text-on-paper-dim); font-style: italic; }

/* ==========================================================================
   Closing CTA — deliberately not a dark inverted band
   ========================================================================== */
.closing { padding-block: clamp(4.5rem, 11vh, 8rem); background: var(--paper-dim); }
.closing .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.closing-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.closing-media img { width: 100%; height: 100%; object-fit: cover; }
.closing-copy .eyebrow { margin-bottom: 1rem; }
.closing-copy p { margin-top: 1rem; max-width: 44ch; color: var(--text-on-paper-dim); line-height: 1.6; }
.closing-actions { margin-top: 1.8rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer { background: var(--ink); color: var(--text-on-dark-dim); padding-block: clamp(3rem, 6vh, 4rem) 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(2rem, 4vw, 3rem); padding-bottom: 2.4rem; border-bottom: 1px solid rgba(244,241,234,0.14); }
.footer-brand .brand { margin-bottom: 0.9rem; }
.footer-grid p { font-size: 0.88rem; line-height: 1.6; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-on-dark); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.9rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; padding-top: 1.6rem; font-size: 0.78rem; }

/* ==========================================================================
   Demo notice (standard style-sample banner, top of page)
   ========================================================================== */
.demo-notice {
  background: var(--ink);
  color: var(--text-on-dark-dim);
  font-size: 13px;
  text-align: center;
  padding: 9px 16px;
  font-family: var(--font-body);
}
.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  margin-right: 8px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  vertical-align: 1px;
}
.demo-notice a { color: var(--gold-bright); text-decoration: underline; margin-left: 10px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    background: var(--ink);
    padding: 1.5rem var(--gutter) 2rem;
    box-shadow: 0 16px 30px -12px rgba(0,0,0,0.5);
  }
  .nav-menu .nav-links { flex-direction: column; gap: 1.1rem; }
  .nav-menu .nav-cta { align-self: flex-start; }
  .nav.is-open .nav-menu { display: flex; }
  .nav-toggle { display: flex; }
  .about .container,
  .closing .container { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid > :last-child { grid-column: 1 / -1; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-item:nth-child(1) { grid-row: span 1; aspect-ratio: 4 / 5; }
  .portfolio-grid > :last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-item:nth-child(1) { aspect-ratio: 4 / 5; }
  .process-list { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}


/* --- Accessibility baseline (Web Interface Guidelines) --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { outline: none; }
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe-area gutters on sticky chrome; contain scroll chaining in drawers/overlays */
.nav, .nav-min, .masthead, .bar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.nav-drawer {
  overscroll-behavior: contain;
}

/* --- Web Interface Guidelines extras --- */
a, button, summary, input, select, textarea, label, [role="button"], [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
h1, h2, h3 { text-wrap: pretty; }
