/* ============================================================
   Wrenfield Studio — shared design system
   Ink navy / brass gold / ivory boutique-studio system.
   ============================================================ */

:root {
  --ink: #0f2438;
  --ink-2: #16324d;
  --ink-deep: #081420;
  --brass: #c6a15b;
  --brass-light: #e4c989;
  --brass-dark: #9c7a3e;
  --ivory: #faf6ee;
  --ivory-dim: #f1e9d8;
  --charcoal: #1f1f1f;
  --forest: #1f3a2e;
  --forest-2: #2b503e;
  --forest-light: #3f6e56;
  --forest-deep: #0f2119;
  --stone: #e1d8c4;
  --stone-2: #cbb99b;

  --shadow-soft: 0 1px 2px rgba(15, 33, 25, 0.05), 0 6px 16px -8px rgba(15, 33, 25, 0.14);
  --shadow-elevated: 0 1px 2px rgba(15, 33, 25, 0.06), 0 12px 28px -10px rgba(15, 33, 25, 0.22),
    0 28px 56px -20px rgba(198, 161, 91, 0.16);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-quiet: cubic-bezier(0.22, 1, 0.36, 1);
}

/* native cross-page transitions where supported — free upgrade, no JS router needed */
@view-transition {
  navigation: auto;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--forest-deep);
  color: var(--ivory);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

.font-display {
  font-family: "Fraunces", ui-serif, Georgia, serif;
}

/* ---------- texture ---------- */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  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 / labels ---------- */
.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-light);
}
.eyebrow.on-dark {
  color: var(--brass-light);
}

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- seal monogram ---------- */
.seal {
  display: inline-block;
  filter: drop-shadow(0 6px 14px rgba(15, 33, 25, 0.18));
}
.seal circle.seal-tick {
  fill: var(--brass-dark);
}
a.seal-link {
  display: inline-block;
  transition: transform 0.5s var(--ease-spring);
}
a.seal-link:hover {
  transform: rotate(8deg) scale(1.04);
}

/* ---------- divider ---------- */
.divider-seal {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: rgba(250, 246, 238, 0.35);
}
.divider-seal::before,
.divider-seal::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(250, 246, 238, 0.3), transparent);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.45s var(--ease-spring), color 0.3s var(--ease-quiet);
  transform: translateY(0);
}
.btn:active {
  transform: translateY(1px);
}

.btn-brass {
  background: var(--brass);
  color: var(--forest-deep);
}
.btn-brass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  transition: opacity 0.4s var(--ease-quiet);
  z-index: -1;
}
.btn-brass:hover {
  transform: translateY(-2px);
}
.btn-brass:hover::after {
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(250, 246, 238, 0.35);
}
.btn-ghost:hover {
  border-color: var(--brass-light);
  color: var(--brass-light);
  transform: translateY(-2px);
}

.btn-outline-ink {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(250, 246, 238, 0.35);
}
.btn-outline-ink:hover {
  transform: translateY(-2px);
  border-color: var(--brass-light);
  color: var(--brass-light);
}

.btn-forest {
  background: var(--forest);
  color: var(--ivory);
}
.btn-forest:hover {
  transform: translateY(-2px);
  background: var(--forest-light);
}

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 17, 14, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(250, 246, 238, 0.1);
}
.nav-link {
  position: relative;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory);
  padding-bottom: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--brass-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-quiet);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}
.nav-link.is-active {
  color: var(--brass-light);
}

#mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-quiet);
}
#mobile-panel.open {
  max-height: 26rem;
}
.hamburger-line {
  transition: transform 0.4s var(--ease-quiet), opacity 0.3s var(--ease-quiet);
  transform-origin: center;
}
#nav-toggle.open .hamburger-line.top {
  transform: translateY(6px) rotate(45deg);
}
#nav-toggle.open .hamburger-line.mid {
  opacity: 0;
}
#nav-toggle.open .hamburger-line.bottom {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-quiet), transform 0.8s var(--ease-quiet);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- cards & surfaces ---------- */
.card {
  position: relative;
  background: rgba(250, 246, 238, 0.04);
  border: 1px solid rgba(250, 246, 238, 0.14);
  border-radius: 20px;
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease-quiet);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-quiet);
}
.card:hover {
  transform: translateY(-4px);
}
.card:hover::after {
  opacity: 1;
}

.panel-ink {
  background: radial-gradient(130% 160% at 15% -10%, var(--forest) 0%, var(--forest-deep) 48%, var(--forest-deep) 100%);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}

.panel-forest {
  background: radial-gradient(130% 160% at 85% -10%, var(--forest) 0%, var(--forest-deep) 48%, var(--forest-deep) 100%);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}

.footer-duotone {
  background: radial-gradient(160% 140% at 8% 0%, var(--forest) 0%, var(--forest-deep) 38%, var(--forest-deep) 100%);
}

/* cursor-reactive spotlight glow, mouse position fed via --mx/--my custom properties */
.panel-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-quiet);
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%), rgba(198, 161, 91, 0.16), transparent 70%);
}
.panel-glow.is-active {
  opacity: 1;
}

/* ---------- line / mask reveal for headings ---------- */
.mask-reveal {
  overflow: hidden;
  display: block;
}
.line-reveal {
  display: block;
  transform: translateY(112%);
  transition: transform 0.9s var(--ease-quiet);
}
.mask-reveal.is-visible .line-reveal {
  transform: translateY(0);
}

/* ---------- process rail fill (About: How We Work) ---------- */
.reveal-fill {
  transform: scaleX(0);
  transition: transform 1.1s var(--ease-quiet);
}
.reveal-fill.is-visible {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-fill {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .line-reveal {
    transform: none;
  }
}

/* ---------- custom cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor {
    cursor: none;
  }
  body.has-cursor a,
  body.has-cursor button,
  body.has-cursor input,
  body.has-cursor textarea,
  body.has-cursor select {
    cursor: none;
  }
}
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-quiet);
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--brass);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(198, 161, 91, 0.55);
  transition: opacity 0.3s var(--ease-quiet), width 0.35s var(--ease-spring), height 0.35s var(--ease-spring),
    border-color 0.35s var(--ease-quiet), background 0.35s var(--ease-quiet);
}
.cursor-dot.is-active,
.cursor-ring.is-active {
  opacity: 1;
}
.cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  background: rgba(198, 161, 91, 0.12);
  border-color: var(--brass);
}

/* ---------- magnetic buttons ---------- */
.magnetic {
  will-change: transform;
}

/* ---------- tilt cards ---------- */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* ---------- signature seal draw-in ---------- */
.signature-seal .draw {
  transition: stroke-dashoffset 1.6s var(--ease-quiet);
}
.signature-seal .fill-piece {
  opacity: 0;
  transform: scale(0.85);
  transform-origin: center;
  transition: opacity 0.7s var(--ease-quiet), transform 0.7s var(--ease-spring);
}
.signature-seal.is-drawn .fill-piece {
  opacity: 1;
  transform: scale(1);
}

/* ---------- concept tag ---------- */
.tag-concept {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid rgba(250, 246, 238, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
  box-shadow: var(--shadow-soft);
}

/* ---------- mockup frames ---------- */
.frame-browser {
  background: var(--ivory);
  border: 1px solid var(--stone);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.frame-browser .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  background: var(--ivory-dim);
  border-bottom: 1px solid var(--stone);
}
.frame-browser .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stone-2);
}

.frame-print {
  box-shadow: var(--shadow-elevated);
  transform: rotate(-1.4deg);
  transition: transform 0.6s var(--ease-quiet);
}
.frame-print:hover {
  transform: rotate(0deg) translateY(-4px);
}

/* ---------- numbered process rows (home: How We Work) ---------- */
.step-row {
  border-top: 1px solid rgba(250, 246, 238, 0.16);
  padding: 1.75rem 0;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  transition: padding-left 0.5s var(--ease-quiet);
}
.step-row:last-child {
  border-bottom: 1px solid rgba(250, 246, 238, 0.16);
}
.step-row:hover {
  padding-left: 0.5rem;
}
.step-num {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--brass-light);
  font-size: 1.05rem;
}
.step-title {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  color: var(--ivory);
  letter-spacing: -0.005em;
}
.step-desc {
  grid-column: 2;
  color: rgba(250, 246, 238, 0.65);
  font-size: 0.92rem;
  max-width: 34rem;
}

/* ---------- feature tile (home: Every Touchpoint) ---------- */
.feature-tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(250, 246, 238, 0.14);
  background: rgba(250, 246, 238, 0.04);
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-quiet), box-shadow 0.5s var(--ease-quiet);
}
.feature-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.feature-tile .feature-caption {
  padding: 1.1rem 1.3rem 1.3rem;
  border-top: 1px solid rgba(250, 246, 238, 0.14);
}

/* ---------- floating detail card (home hero) ---------- */
.floating-card {
  background: var(--ivory);
  color: var(--forest-deep);
  border-radius: 14px;
  box-shadow: var(--shadow-elevated);
  transition: transform 0.5s var(--ease-quiet);
}
.floating-card:hover {
  transform: translateY(-3px);
}

/* ---------- brief mockup (home: Every Project Starts With a Conversation) ---------- */
.brief-mock {
  background: rgba(250, 246, 238, 0.04);
  border: 1px solid rgba(250, 246, 238, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(6px);
}
.brief-field {
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid rgba(250, 246, 238, 0.18);
  border-radius: 10px;
  color: rgba(250, 246, 238, 0.5);
  font-size: 0.85rem;
}
.brief-chip {
  background: rgba(250, 246, 238, 0.08);
  border: 1px solid rgba(250, 246, 238, 0.2);
  border-radius: 999px;
  color: var(--ivory);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}
.brief-chip.is-active {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--forest-deep);
}

/* ---------- grow band (home: More Ways We Help You Grow) ---------- */
.grow-card {
  background: rgba(250, 246, 238, 0.03);
  border: 1px solid rgba(250, 246, 238, 0.12);
  border-radius: 20px;
  transition: transform 0.5s var(--ease-quiet), border-color 0.4s var(--ease-quiet), background 0.4s var(--ease-quiet);
}
.grow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(198, 161, 91, 0.5);
  background: rgba(250, 246, 238, 0.05);
}
.grow-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(198, 161, 91, 0.14);
  color: var(--brass-light);
}

/* ============================================================
   Continuous ambient motion — transform/opacity only, GPU-cheap.
   Three primitives, mixed per-section rather than repeated:
     .motion-field   animated gradient drift (dark panels)
     .motion-field.on-light  same, tuned for ivory backgrounds
     .kb / .kb-inner Ken Burns pan+zoom on mockup "photo" blocks
     .sheen          slow diagonal light sweep (light sections)
     [data-parallax] scroll-driven parallax, run continuously via rAF in site.js
   All disabled under prefers-reduced-motion (see bottom of file).
   ============================================================ */
@keyframes drift-a {
  0%   { transform: translate3d(-4%, -3%, 0) scale(1.1); }
  50%  { transform: translate3d(3%, 4%, 0) scale(1.18); }
  100% { transform: translate3d(-4%, -3%, 0) scale(1.1); }
}
@keyframes drift-b {
  0%   { transform: translate3d(4%, 3%, 0) scale(1.14); }
  50%  { transform: translate3d(-3%, -4%, 0) scale(1.2); }
  100% { transform: translate3d(4%, 3%, 0) scale(1.14); }
}
@keyframes kenburns {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.1) translate3d(-1.8%, -1.2%, 0); }
}
@keyframes sheen-sweep {
  0%   { transform: translate3d(-15%, 0, 0) rotate(8deg); }
  100% { transform: translate3d(15%, 0, 0) rotate(8deg); }
}

.motion-field {
  position: absolute;
  inset: -20%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.motion-field span {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.motion-field .blob-a {
  width: 55%;
  height: 55%;
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(63, 110, 86, 0.26), transparent 70%);
  animation: drift-a 40s ease-in-out infinite;
}
.motion-field .blob-b {
  width: 50%;
  height: 50%;
  bottom: -10%;
  right: -8%;
  background: radial-gradient(circle, rgba(250, 246, 238, 0.09), transparent 70%);
  animation: drift-b 48s ease-in-out infinite;
}
.motion-field.on-light .blob-a {
  background: radial-gradient(circle, rgba(198, 161, 91, 0.16), transparent 70%);
}
.motion-field.on-light .blob-b {
  background: radial-gradient(circle, rgba(250, 246, 238, 0.07), transparent 70%);
}

.kb {
  position: relative;
  overflow: hidden;
}
.kb-inner {
  position: absolute;
  inset: -8%;
  will-change: transform;
  animation: kenburns 26s ease-in-out infinite alternate;
}

.sheen {
  position: absolute;
  inset: -30% -10%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.sheen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 30%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(250, 246, 238, 0.05) 45%, rgba(250, 246, 238, 0.05) 55%, transparent);
  will-change: transform;
  animation: sheen-sweep 22s ease-in-out infinite alternate;
}

[data-parallax] {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .motion-field span,
  .kb-inner,
  .sheen::after {
    animation: none !important;
    transform: none !important;
  }
}

/* ---------- support cards (home: Support, Always) ---------- */
.support-card {
  position: relative;
  border: 1px solid rgba(250, 246, 238, 0.14);
  border-radius: 20px;
  background: rgba(250, 246, 238, 0.04);
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease-quiet), box-shadow 0.5s var(--ease-quiet);
}
.support-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.arrow-btn {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(250, 246, 238, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  transition: background 0.4s var(--ease-quiet), border-color 0.4s var(--ease-quiet), color 0.4s var(--ease-quiet), transform 0.4s var(--ease-spring);
}
.support-card:hover .arrow-btn {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--forest-deep);
  transform: rotate(45deg);
}

/* ---------- flat screen card (Squarespace-format mockups, no browser chrome) ---------- */
.screen-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(250, 246, 238, 0.14);
  box-shadow: var(--shadow-elevated);
}
.screen-pill {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest-deep);
  box-shadow: var(--shadow-soft);
}

/* ---------- form ---------- */
.field {
  width: 100%;
  background: rgba(250, 246, 238, 0.05);
  border: 1px solid rgba(250, 246, 238, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--ivory);
  transition: border-color 0.3s var(--ease-quiet), box-shadow 0.3s var(--ease-quiet);
}
.field::placeholder {
  color: rgba(250, 246, 238, 0.4);
}
.field:focus {
  border-color: var(--brass-light);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.18);
  outline: none;
}
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, 0.7);
  margin-bottom: 0.4rem;
}
