/* ------------------------------------------------------------------ */
/*  Veridian Holdings — base                                          */
/* ------------------------------------------------------------------ */

:root {
  --bg: #F4EFE3;
  --bg-elev: #EDE7D5;
  --ink: #161A18;
  --ink-soft: #3F4A43;
  --ink-mute: #8A958D;
  --ink-faint: #B8BFB8;

  --green-deep: #2A4633;
  --green: #345840;
  --green-light: #6B8A74;

  --rule: rgba(42, 70, 51, 0.12);
  --rule-soft: rgba(42, 70, 51, 0.06);

  --status-green: #4FA76C;

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --gutter-y: clamp(1rem, 2.5vw, 2rem);
}

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

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;

  position: relative;
  overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor [data-magnetic] {
  cursor: none;
}

/* Subtle layered ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      900px circle at 18% 22%,
      rgba(42, 70, 51, 0.06),
      transparent 55%
    ),
    radial-gradient(
      1100px circle at 82% 78%,
      rgba(42, 70, 51, 0.05),
      transparent 60%
    );
}

/* Fine paper-like grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.165 0 0 0 0 0.275 0 0 0 0 0.2 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/*  Custom cursor                                                     */
/* ------------------------------------------------------------------ */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  opacity: 0;
  will-change: transform, width, height;
  transition:
    width 0.32s var(--ease-out),
    height 0.32s var(--ease-out),
    background-color 0.32s var(--ease-out),
    border-color 0.32s var(--ease-out),
    opacity 0.4s var(--ease-out);
}
.cursor.is-ready {
  opacity: 1;
}
.cursor.is-hover {
  width: 64px;
  height: 64px;
  background: rgba(42, 70, 51, 0.07);
  border-color: var(--green-deep);
}
.cursor-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green-deep);
  transition: opacity 0.32s var(--ease-out);
}
.cursor.is-hover .cursor-dot {
  opacity: 0;
}

@media (hover: none) {
  .cursor {
    display: none !important;
  }
}

/* ------------------------------------------------------------------ */
/*  Header                                                            */
/* ------------------------------------------------------------------ */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gutter-y) var(--gutter);
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--green-deep);
  outline: none;
}
.brand:focus-visible {
  outline: 1px dashed var(--green);
  outline-offset: 6px;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 30px;
  flex-shrink: 0;
}
.brand-mark-path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linejoin: miter;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation:
    mark-stroke 1.4s 0.25s var(--ease-out) forwards,
    mark-fill 0.5s 1.55s var(--ease-out) forwards;
}
@keyframes mark-stroke {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes mark-fill {
  to {
    fill: currentColor;
    stroke-width: 0;
  }
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);

  opacity: 0;
  transform: translateY(4px);
  animation: rise 0.9s 0.5s var(--ease-out) forwards;
}
/* ------------------------------------------------------------------ */
/*  Hero                                                              */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 8vh, 6rem) var(--gutter);
}

.hero-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 8.4vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: var(--green-deep);
  font-weight: 400;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > * {
  display: inline-block;
}
.hero-title .line {
  opacity: 0;
  transform: translateY(110%);
}
.hero-title .line:nth-child(1) {
  animation: line-rise 1s 0.8s var(--ease-out) forwards;
}
.hero-title .line:nth-child(2) {
  animation: line-rise 1s 0.95s var(--ease-out) forwards;
}
.hero-title .line:nth-child(3) {
  animation: line-rise 1s 1.1s var(--ease-out) forwards;
}

@keyframes line-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sub {
  max-width: 36ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);

  opacity: 0;
  transform: translateY(8px);
  animation: rise 1.1s 1.4s var(--ease-out) forwards;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  flex-wrap: wrap;

  opacity: 0;
  animation: fade 1.1s 1.65s var(--ease-out) forwards;
}

.email-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--green-deep);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  padding: 0.85rem 0;
  outline: none;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.5s var(--ease-out);
}
.email-link:active {
  transform: scale(0.985);
}
.email-link:focus-visible {
  outline: 1px dashed var(--green);
  outline-offset: 8px;
}
.email-link-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  position: relative;
}
.email-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  height: 1px;
  background: var(--green-deep);
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform 0.5s var(--ease-in-out);
}
.email-link:hover::before,
.email-link:focus-visible::before {
  transform-origin: left center;
  animation: rule-loop 0.85s 0.5s var(--ease-in-out);
}
@keyframes rule-loop {
  0% {
    transform: scaleX(1);
    transform-origin: right;
  }
  49.999% {
    transform: scaleX(0);
    transform-origin: right;
  }
  50% {
    transform: scaleX(0);
    transform-origin: left;
  }
  100% {
    transform: scaleX(1);
    transform-origin: left;
  }
}
.email-link-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.4s var(--ease-out);
}
.email-link:hover .email-link-arrow {
  transform: translateX(4px);
}

.hero-cta-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-cta-hint kbd {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/*  Footer                                                            */
/* ------------------------------------------------------------------ */

.site-footer {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: var(--gutter-y) var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);

  opacity: 0;
  animation: fade 1.2s 1.9s var(--ease-out) forwards;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-row--left {
  justify-content: flex-start;
}
.footer-row--center {
  justify-content: center;
  color: var(--green);
}
.footer-row--right {
  justify-content: flex-end;
}

.clock {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.14em;
}
.clock-zone {
  color: var(--ink-faint);
  margin-left: 0.15em;
}

.footer-locations {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}
.footer-locations-sep {
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: left;
  }
  .footer-row--left,
  .footer-row--center,
  .footer-row--right {
    justify-content: flex-start;
  }
  .footer-row--center {
    order: 3;
  }
}

/* ------------------------------------------------------------------ */
/*  Animations                                                        */
/* ------------------------------------------------------------------ */

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.7);
  }
}

/* ------------------------------------------------------------------ */
/*  iPhone notch / Dynamic Island safe areas                          */
/* ------------------------------------------------------------------ */

.site-header,
.hero,
.site-footer {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.site-footer {
  padding-bottom: max(var(--gutter-y), env(safe-area-inset-bottom));
}

/* ------------------------------------------------------------------ */
/*  Mobile / touch refinements                                        */
/* ------------------------------------------------------------------ */

/* Hide keyboard hint on devices without a physical keyboard */
@media (hover: none) {
  .hero-cta-hint {
    display: none;
  }
  .email-link {
    padding: 1rem 0;
  }
}

/* Soften compound visual noise on small viewports */
@media (max-width: 640px) {
  body::after {
    opacity: 0.22;
  }
  #hero-canvas {
    opacity: 0.7;
  }
  .hero {
    padding-top: clamp(1.5rem, 6vh, 4rem);
    padding-bottom: clamp(1.5rem, 6vh, 4rem);
  }
  .hero-cta {
    gap: 1rem;
  }
}

/* Very narrow phones — tighten gutters, keep type readable */
@media (max-width: 380px) {
  :root {
    --gutter: 1.25rem;
  }
  .brand-mark {
    width: 32px;
    height: 26px;
  }
  .brand-wordmark {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
  }
}

/* Landscape phone — avoid the hero squashing */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
}

/* ------------------------------------------------------------------ */
/*  Reduced motion                                                    */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  #hero-canvas {
    display: none;
  }
  .hero-title .line,
  .hero-sub,
  .hero-cta,
  .brand-wordmark,
  .header-meta,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }
  .brand-mark-path {
    fill: currentColor;
    stroke-width: 0;
    stroke-dashoffset: 0;
  }
}
