/* =============================================================
   HefTek — styles.css
   Black & silver. Cormorant Garamond display. Minimalist.
   One page, one statement.
   ============================================================= */

:root {
  --void:          #060608;
  --void-2:        #0c0c10;

  /* silver scale */
  --silver-hi:     #f0eff2;
  --silver-mid:    #a8adb8;
  --silver-dim:    #878b9f;
  --silver-ghost:  #72788f;

  /* accent — sampled from the mark */
  --accent-blue:      #1c9bec;
  --accent-blue-dim:  rgba(28, 155, 236, 0.35);

  /* Omni Agent's own brand color, used sparingly for the cross-reference card */
  --omni-amber:    #ffb02e;

  /* borders & glass */
  --border:        rgba(255, 255, 255, 0.07);
  --border-hi:     rgba(255, 255, 255, 0.14);

  /* type */
  --font-display:  "Cormorant Garamond", Georgia, serif;
  --font-body:     "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, monospace;

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --safe-b:        env(safe-area-inset-bottom, 0px);
  --safe-l:        env(safe-area-inset-left, 0px);
  --safe-r:        env(safe-area-inset-right, 0px);
}

/* ------------------------------------------------------------- reset */

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

html {
  overflow-x: hidden;
  color-scheme: dark;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--void);
  color: var(--silver-hi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

::selection {
  background: rgba(240, 239, 242, 0.16);
  color: var(--silver-hi);
}

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

img {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 1px solid var(--silver-mid);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ------------------------------------------------------------- grain texture */

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* subtle radial atmosphere — warm center, pure black edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 55% at 50% 42%,
    rgba(80, 82, 100, 0.10) 0%,
    transparent 70%
  );
}

/* ------------------------------------------------------------- hero */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 6vw, 40px) clamp(20px, 6vw, 32px) clamp(64px, 10vw, 96px);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 4vw, 32px);
  transform: translateX(-50%);
  width: 24px;
  height: 44px;
  display: block;
  opacity: 0;
  animation: scroll-cue-appear 1s var(--ease) 5.3s forwards;
}

@keyframes scroll-cue-appear {
  to { opacity: 1; }
}

.scroll-cue-line {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  width: 1px;
  height: 100%;
  overflow: hidden;
  background: var(--border-hi);
}

.scroll-cue-line::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--silver-mid) 50%, transparent);
  animation: scroll-cue-flow 2.4s ease-in-out infinite;
}

@keyframes scroll-cue-flow {
  0%   { top: -100%; }
  100% { top: 100%;  }
}

@media (max-height: 620px) {
  .scroll-cue {
    display: none;
  }
}

/* ------------------------------------------------------------- logo mark */

.mark {
  margin-bottom: clamp(18px, 4vw, 28px);
  /* opacity starts at 0 — JS drives the flicker */
  opacity: 0;
  will-change: opacity;
  filter: drop-shadow(0 0 0px rgba(200, 205, 220, 0));
  transition: filter 0.6s var(--ease);
}

.mark.lit {
  filter: drop-shadow(0 0 22px rgba(180, 185, 210, 0.18));
}

.mark img {
  width: clamp(88px, 20vw, 160px);
  height: clamp(88px, 20vw, 160px);
}

/* ------------------------------------------------------------- wordmark */

.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  letter-spacing: 0.28em;
  padding-left: 0.28em; /* optical re-centre for tracked text */
  color: var(--silver-mid);
  margin-bottom: clamp(20px, 4vw, 36px);
}

/* ------------------------------------------------------------- headline */

h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 8vw, 5.2rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--silver-hi);
  margin-bottom: clamp(16px, 3vw, 28px);
}

h1 em {
  font-style: italic;
  font-weight: 300;
  /* silver gradient — logo accent repurposed as type treatment */
  background: linear-gradient(
    110deg,
    var(--silver-mid) 0%,
    var(--silver-hi)  40%,
    var(--silver-mid) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s ease-in-out infinite;
}

@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ------------------------------------------------------------- sub */

.sub {
  font-family: var(--font-body);
  font-size: clamp(0.88rem, 2.6vw, 1.05rem);
  font-weight: 300;
  color: var(--silver-dim);
  line-height: 1.7;
  max-width: 52ch;
}

/* ------------------------------------------------------------- shared section rhythm */

main {
  position: relative;
  z-index: 1;
}

section {
  padding: clamp(56px, 10vw, 108px) clamp(20px, 6vw, 32px);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: clamp(12px, 2vw, 18px);
}

section h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  letter-spacing: -0.01em;
  color: var(--silver-hi);
  margin-bottom: clamp(28px, 5vw, 44px);
}

/* ------------------------------------------------------------- what we build */

.services {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.services .lead {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  line-height: 1.7;
  color: var(--silver-mid);
  max-width: 46ch;
  margin: 0 auto clamp(20px, 4vw, 28px);
}

.build-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: left;
}

@media (min-width: 640px) {
  .build-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.build-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 30px);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background-color 0.4s var(--ease);
}

.build-card:hover {
  border-color: var(--border-hi);
  background-color: rgba(255, 255, 255, 0.018);
  transform: translateY(-3px);
}

.build-index {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--accent-blue);
  margin-bottom: clamp(10px, 2vw, 14px);
}

.build-card h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--silver-hi);
  margin-bottom: 8px;
}

.build-card p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--silver-dim);
}

/* ------------------------------------------------------------- featured platform */

.featured {
  max-width: 720px;
  margin: 0 auto;
}

.featured-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--void-2);
  padding: clamp(32px, 6vw, 52px);
  text-align: center;
}

.featured-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--omni-amber);
  margin-bottom: clamp(14px, 3vw, 20px);
}

.featured-panel p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.94rem, 2.2vw, 1.05rem);
  line-height: 1.7;
  color: var(--silver-dim);
  max-width: 46ch;
  margin: 0 auto clamp(22px, 4vw, 30px);
}

.mono-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--silver-mid);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.mono-link-domain {
  color: var(--omni-amber);
}

.mono-link:hover {
  color: var(--silver-hi);
  border-color: var(--silver-dim);
}

/* ------------------------------------------------------------- work with heftek (cta) */

.cta {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  color: var(--silver-dim);
  margin-bottom: clamp(22px, 4vw, 32px);
}

.cta-contact {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 4.4vw, 2rem);
  color: var(--silver-hi);
  border-bottom: 1px solid var(--border-hi);
  padding-bottom: 6px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cta-contact:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* ------------------------------------------------------------- scroll reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.build-grid .build-card:nth-child(1) { transition-delay: 0s;    }
.build-grid .build-card:nth-child(2) { transition-delay: 0.08s; }
.build-grid .build-card:nth-child(3) { transition-delay: 0.16s; }
.build-grid .build-card:nth-child(4) { transition-delay: 0.24s; }

/* ------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 6vw, 32px) calc(18px + var(--safe-b));
  padding-left: calc(clamp(20px, 6vw, 32px) + var(--safe-l));
  padding-right: calc(clamp(20px, 6vw, 32px) + var(--safe-r));
  border-top: 1px solid var(--border);
}

.footer-domain,
.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--silver-ghost);
}

.footer-meta {
  margin-left: auto;
}

.footer-contact {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--silver-mid);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.footer-contact:hover {
  color: var(--silver-hi);
  border-color: var(--silver-dim);
}

/* ------------------------------------------------------------- fade-in sequence */

[data-fade] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-fade].visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer[data-fade] {
  transform: none; /* footer never slides up, only fades */
}

.site-footer[data-fade].visible {
  transform: none;
}

/* ------------------------------------------------------------- logo flicker */

@keyframes flicker-logo {
  0%   { opacity: 0;    }
  6%   { opacity: 0.85; }
  8%   { opacity: 0;    }
  14%  { opacity: 0.9;  }
  16%  { opacity: 0;    }
  22%  { opacity: 0;    }
  26%  { opacity: 1;    }
  30%  { opacity: 0.15; }
  34%  { opacity: 1;    }
  40%  { opacity: 0.7;  }
  46%  { opacity: 1;    }
  54%  { opacity: 0.5;  }
  60%  { opacity: 1;    }
  70%  { opacity: 0.88; }
  80%  { opacity: 1;    }
  90%  { opacity: 0.95; }
  100% { opacity: 1;    }
}

.mark.flickering {
  animation: flicker-logo 1.9s var(--ease) forwards;
}

/* ------------------------------------------------------------- mobile */

@media (max-width: 600px) {
  .br-desk {
    display: none;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
    gap: 8px 20px;
  }

  .footer-meta {
    margin: 0;
    width: 100%;
    text-align: center;
  }
}

/* short viewports (landscape phones) — tighten the hero's vertical rhythm
   so the opening screen still reads well before the visitor scrolls on. */
@media (max-height: 620px) {
  .mark img {
    width: clamp(64px, 14vw, 96px);
    height: clamp(64px, 14vw, 96px);
  }
  .mark {
    margin-bottom: 12px;
  }
  .wordmark {
    margin-bottom: 14px;
  }
  h1 {
    font-size: clamp(1.8rem, 7vw, 3rem);
    margin-bottom: 10px;
  }
  .sub br {
    display: none;
  }
}

/* ------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .mark {
    opacity: 1;
    animation: none !important;
  }
  [data-fade] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  h1 em {
    animation: none;
    background-position: 0% 50%;
  }
  .scroll-cue {
    opacity: 1;
    animation: none;
  }
  .scroll-cue-line::before {
    animation: none;
    top: 0;
  }
  .build-card:hover {
    transform: none;
  }
}
