/* ── Company page — marketing-scale layout (prefix co-) ──────────────────────
   The reusable look lives in foundry-ui.css; this file is only the page-specific
   composition the kit doesn't carry: full hero, scroll nav, sections, reveal. */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { padding: 0; }
.co-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* Sticky nav — portal tab look, site behaviour */
.co-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 28px;
  background: rgba(7,3,14,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.co-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.co-anvil {
  width: 26px; aspect-ratio: 654/624;
  background: linear-gradient(160deg,#c4b5fd,#a78bfa 40%,#f5a35a 80%,#d97706);
  -webkit-mask: url('images/anvil-updated-white.png') center/contain no-repeat;
          mask: url('images/anvil-updated-white.png') center/contain no-repeat;
  /* whole brand is hidden at the top; fades in once you scroll past the hero */
  opacity: 0; transform: translateX(-8px);
  transition: opacity .45s ease, transform .45s ease;
}
.co-nav.is-scrolled .co-anvil { opacity: 1; transform: none; }
.co-wordmark {
  width: 210px; aspect-ratio: 2115/171;
  background: linear-gradient(90deg,#c4b5fd,#a78bfa 35%,#f5a35a 75%,#d97706);
  -webkit-mask: url('images/arkaenite-foundry-logo-white.png') center/contain no-repeat;
          mask: url('images/arkaenite-foundry-logo-white.png') center/contain no-repeat;
  /* hidden at the top of the page — fades in once the hero wordmark scrolls away */
  opacity: 0; transform: translateX(-8px);
  transition: opacity .45s ease, transform .45s ease;
}
.co-nav.is-scrolled .co-wordmark { opacity: 1; transform: none; transition-delay: .07s; }
.co-nav.is-scrolled { background: rgba(7,3,14,0.85); }
.co-navlinks { position: relative; display: flex; align-items: center; gap: 4px; }
.co-navlink {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  font-variant: small-caps; letter-spacing: 0.05em;
  color: var(--text3); padding: 8px 14px; transition: color .18s; white-space: nowrap;
}
/* The word itself — wrapped so the underline indicator can measure & center on it
   (the sigil to its left is a decorative marker, not part of the underline). */
.co-navlink__txt { display: inline-block; }
.co-navlink:hover { color: var(--text2); }
.co-navlink.active { color: #ffe2b3; text-shadow: 0 0 14px rgba(217,119,6,0.45); }
.co-nav-ind {
  position: absolute; bottom: -1px; left: 0; height: 2px;
  background: var(--rune-line);
  box-shadow: 0 0 8px rgba(217,119,6,0.7), 0 0 16px rgba(124,58,237,0.4);
  transition: transform .28s cubic-bezier(.4,0,.2,1), width .22s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.co-nav-cta { margin-left: 10px; white-space: nowrap; text-indent: 0.12em; }
.co-navlinks-wrap { display: flex; align-items: center; }

/* Hamburger — hidden on desktop, takes the Portal CTA's slot on mobile. Three
   bars (the middle is the span, top/bottom are its pseudos) that morph to an X. */
.co-burger { display: none; }
.co-menu-divider { display: none; }   /* the in-menu divider is mobile-only */
.co-burger {
  width: 42px; height: 42px; padding: 0; background: none; border: none;
  cursor: pointer; position: relative; color: var(--amber2);
  -webkit-tap-highlight-color: transparent; transition: color .2s;
}
.co-burger__bars,
.co-burger__bars::before,
.co-burger__bars::after {
  content: ""; position: absolute; left: 50%; width: 22px; height: 2px;
  background: currentColor; border-radius: 1px; transform: translateX(-50%);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .18s ease, background-color .2s;
}
.co-burger__bars { top: 50%; margin-top: -1px; }   /* middle bar */
.co-burger__bars::before { top: -7px; }            /* top bar */
.co-burger__bars::after  { top: 7px;  }            /* bottom bar */
.co-burger.is-open { color: var(--amber-lit); }
.co-burger.is-open .co-burger__bars { background: transparent; }   /* middle fades */
.co-burger.is-open .co-burger__bars::before { transform: translateX(-50%) translateY(7px)  rotate(45deg); }
.co-burger.is-open .co-burger__bars::after  { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

/* Hero */
.co-hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 96px 28px 64px; position: relative;
}
/* The hero is a skip-link target (tabindex=-1), not a control — don't draw the
   focus ring around the whole viewport when focus lands here. */
.co-hero:focus, .co-hero:focus-visible { outline: none; box-shadow: none; }
.co-hero-mark {
  width: min(620px, 86vw); aspect-ratio: 2115/171; margin-bottom: 26px;
  background: linear-gradient(90deg,#c4b5fd,#a78bfa 35%,#f5a35a 75%,#d97706);
  -webkit-mask: url('images/arkaenite-foundry-logo-white.png') center/contain no-repeat;
          mask: url('images/arkaenite-foundry-logo-white.png') center/contain no-repeat;
  filter: drop-shadow(0 0 28px rgba(124,58,237,0.35)) drop-shadow(0 0 14px rgba(217,119,6,0.2));
  will-change: transform, opacity;
  /* Forge-in: slow calm fade with the glow settling in. No transform/blur here;
     the scroll fly-up owns transform, and blur made it pop oddly. */
  animation: co-forge-in 1.6s ease-out;
}
@keyframes co-forge-in {
  0%   { opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  60%  { opacity: 1; filter: drop-shadow(0 0 42px rgba(251,191,36,0.38)) drop-shadow(0 0 20px rgba(124,58,237,0.3)); }
  100% { opacity: 1; filter: drop-shadow(0 0 28px rgba(124,58,237,0.35)) drop-shadow(0 0 14px rgba(217,119,6,0.2)); }
}
.co-tagline {
  font-family: var(--font-display), serif; font-size: clamp(20px,3vw,30px);
  font-weight: 500; font-style: italic; color: var(--gold-text);
  letter-spacing: 0.02em; max-width: 640px; line-height: 1.4; margin-bottom: 18px;
}
.co-sub {
  font-family: var(--font-body), serif; font-size: 16px; color: var(--text2);
  max-width: 560px; line-height: 1.7; margin-bottom: 34px;
}
.co-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.co-scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--text3); font-family: var(--font-body),serif; font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase; animation: co-bob 2.4s ease-in-out infinite;
}
@keyframes co-bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* Sections */
.co-section { padding: 0 0 8px; }

/* Section divider: visual comes from .af-divider (kit); this is just spacing. */
.co-divider { max-width: 1080px; margin: 0 auto; padding: 70px 28px; }

/* Nav link glyphs — dim by default, lit on hover / active section */
.co-navlink .af-rune { font-size: 11px; margin-right: 7px; vertical-align: 1px; display: inline-block; }
.co-navlink:hover .af-rune,
.co-navlink.active .af-rune { color: var(--amber); opacity: 1; text-shadow: 0 0 8px rgba(217,119,6,0.6); }
/* One-shot flare when a section becomes active (class toggled by JS). */
.co-navlink .af-rune.co-flare { animation: co-rune-flare .5s ease-out; }
@keyframes co-rune-flare {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.55); text-shadow: 0 0 14px rgba(251,191,36,1), 0 0 22px rgba(217,119,6,0.7); }
  100% { transform: scale(1); }
}
.co-eyebrow {
  font-family: var(--font-body),serif; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--amber2); margin-bottom: 12px;
}
.co-h2 {
  font-family: var(--font-display),serif; font-size: clamp(28px,4vw,42px);
  font-weight: 600; color: var(--gold-text); letter-spacing: 0.02em;
  line-height: 1.15; margin-bottom: 22px; text-shadow: 0 0 24px rgba(217,119,6,0.18);
}
.co-veil-heading { margin: 0; line-height: 0; }
.co-veil-logo {
  display: block; width: min(460px, 74%); height: auto; margin-bottom: 24px;
  filter: drop-shadow(0 0 26px rgba(124,58,237,0.28)) drop-shadow(0 0 12px rgba(217,119,6,0.18));
}
.co-lead { font-family: var(--font-body),serif; font-size: 18px; color: var(--text); line-height: 1.75; max-width: 720px; }
.co-body { font-family: var(--font-body),serif; font-size: 16px; color: var(--text2); line-height: 1.75; max-width: 680px; margin-top: 16px; }

/* Pillars grid */
.co-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 34px; }
.co-pillar { padding: 24px 22px 26px; }
.co-pillar h3 { font-family: var(--font-display),serif; font-size: 20px; font-weight: 600; color: var(--violet-300); margin-bottom: 8px; }
.co-pillar p { font-family: var(--font-body),serif; font-size: 14px; color: var(--text2); line-height: 1.65; }

/* Forged-plate showcase grid */
.co-plate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }

/* Veilbound media frame (placeholder for future trailer/art) */
.co-media {
  margin-top: 30px; aspect-ratio: 16/9; width: 100%;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 35%, rgba(124,58,237,0.14), transparent 70%),
    var(--surface2);
  color: var(--text3); font-family: var(--font-body),serif; letter-spacing: 0.04em;
}
.co-media .af-pill { margin-bottom: 4px; }

/* Devlog teaser — the rune-spine timeline itself is the kit's .af-timeline; this
   is just the page spacing + the entries' own content styling. */
.co-timeline { margin-top: 36px; }
.co-tl-item h4 { font-family: var(--font-display),serif; font-size: 19px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.co-tl-item p { font-family: var(--font-body),serif; font-size: 14px; color: var(--text2); line-height: 1.65; max-width: 620px; }
a.co-tl-item { display: block; text-decoration: none; color: inherit; }
a.co-tl-item h4 { transition: color .15s; }
a.co-tl-item:hover h4 { color: var(--gold-text); }
.co-tl-state { font-family: var(--font-body),serif; font-size: 14px; font-style: italic; color: var(--text2); margin-top: 30px; }
/* Flare each node as its entry lands (reuses the kit's shine keyframe). */
.co-tl-item.in::before { animation: af-timeline-shine 0.7s ease-out 0.2s; }

.co-devlog-cta { margin-top: 30px; }

/* Community */
.co-cta-panel { margin-top: 34px; padding: 40px 32px; text-align: center; }
.co-cta-panel p { font-family: var(--font-body),serif; color: var(--text2); font-size: 16px; line-height: 1.7; max-width: 520px; margin: 0 auto 24px; }
.co-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* The choreographed reveal itself lives in the kit (.af-panel--pulse.is-armed →
   .is-revealed). The CTA panel just opts in via those classes in the markup. */

/* Discord CTA — icon only. Corner ◆ glyphs dropped so the mark can fill the
   button; padding shrinks as the icon grows so the button keeps its size. */
.co-discord-btn { display: inline-flex; align-items: center; justify-content: center; padding: 7px 20px; }
.co-discord-btn::before, .co-discord-btn::after { content: none; }
.co-discord-icon { width: 32px; height: 32px; flex-shrink: 0; display: block; }

/* Footer */
.co-footer {
  border-top: 1px solid var(--border); padding: 40px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.co-foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.co-foot-links a { color: var(--text2); text-decoration: none; font-family: var(--font-body),serif; font-size: 14px; transition: color .15s; }
.co-foot-links a:hover { color: var(--amber2); }
.co-foot-links a.co-foot-icon { display: inline-flex; align-items: center; }
.co-foot-links a.co-foot-icon svg { width: 19px; height: 19px; display: block; }
/* External-link footer item (text + ↗ arrow) */
.co-foot-links a.co-foot-ext { display: inline-flex; align-items: center; gap: 5px; }
.co-foot-ext__arrow { width: 13px; height: 13px; flex-shrink: 0; transition: transform .18s ease; }
.co-foot-links a.co-foot-ext:hover .co-foot-ext__arrow { transform: translate(1.5px, -1.5px); }
.co-foot-note { font-family: var(--font-body),serif; font-size: 13px; color: var(--text2); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Stagger the pillar / plate cards so a row reveals as a
   cascade rather than all at once. */
.co-grid .reveal:nth-child(2),
.co-plate-grid .reveal:nth-child(2) { transition-delay: .09s; }
.co-grid .reveal:nth-child(3),
.co-plate-grid .reveal:nth-child(3) { transition-delay: .18s; }

/* When a divider enters view it plays the kit's sequenced reveal: the glyph
   rises and shines, then the lines draw outward from it (keyframes in the kit). */
.co-divider.reveal { transform: none; }            /* glyph rises, doesn't slide in */
.co-divider.in { animation: af-divider-rise 0.6s ease-out both; }
.co-divider.in::before,
.co-divider.in::after { animation: af-divider-extend 0.5s ease-out 0.5s both; }

/* Click sparks — a small burst of embers from the cursor (JS-spawned). */
.co-spark {
  --dx: 0px; --dy: 0px;          /* travel vector — JS overrides these inline per spark */
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 120;
  will-change: transform, opacity;
  animation: co-spark .6s ease-out forwards;
}
@keyframes co-spark {
  0%   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(.2); opacity: 0; }
}

@media (max-width: 760px) {
  .co-burger { display: inline-flex; align-items: center; justify-content: center; }

  /* The link wrap becomes a full-width sheet that drops from under the nav bar. */
  .co-navlinks-wrap {
    position: fixed; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 22px 22px;
    background: rgba(7,3,14,0.94); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border2);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    /* closed: lifted + faded, non-interactive until opened */
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .28s ease, transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear .28s;
  }
  .co-navlinks-wrap.is-open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .28s ease, transform .3s cubic-bezier(.4,0,.2,1), visibility 0s;
  }
  .co-navlinks { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .co-navlink { width: 100%; text-align: left; font-size: 21px; padding: 13px 12px; }
  .co-nav-ind { display: none; }                 /* sliding underline is a desktop-row thing */
  .co-menu-divider { display: flex; margin: 12px 4px 16px; }
  .co-nav-cta { margin-left: 0; width: 100%; text-align: center; text-indent: 0; }

  /* Stagger the items in as the sheet opens (mirrors the section reveals). */
  .co-navlink, .co-menu-divider, .co-nav-cta {
    opacity: 0; transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
  }
  .co-navlinks-wrap.is-open .co-navlink,
  .co-navlinks-wrap.is-open .co-menu-divider,
  .co-navlinks-wrap.is-open .co-nav-cta { opacity: 1; transform: none; }
  .co-navlinks-wrap.is-open .co-navlink:nth-child(1) { transition-delay: .06s; }
  .co-navlinks-wrap.is-open .co-navlink:nth-child(2) { transition-delay: .11s; }
  .co-navlinks-wrap.is-open .co-navlink:nth-child(3) { transition-delay: .16s; }
  .co-navlinks-wrap.is-open .co-navlink:nth-child(4) { transition-delay: .21s; }
  .co-navlinks-wrap.is-open .co-navlink:nth-child(5) { transition-delay: .26s; }
  .co-navlinks-wrap.is-open .co-menu-divider { transition-delay: .30s; }
  .co-navlinks-wrap.is-open .co-nav-cta { transition-delay: .34s; }

  .co-grid, .co-plate-grid { grid-template-columns: 1fr; }
  .co-footer { flex-direction: column; align-items: flex-start; }
  .co-hero { padding: 88px 22px 56px; }
  .co-divider { padding: 54px 22px; }
}
@media (max-width: 480px) {
  .co-wrap, .co-nav, .co-hero, .co-divider, .co-footer { padding-left: 18px; padding-right: 18px; }
  .co-wordmark { display: none; }   /* show just the anvil mark so the CTA always fits */
  .co-cta-panel { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .co-scrollcue { animation: none; }
  .co-hero-mark,
  .co-divider.in,
  .co-divider.in::before,
  .co-divider.in::after,
  .co-tl-item.in::before,
  .co-navlink .af-rune.co-flare { animation: none; }
  .co-hero-mark { clip-path: none; }   /* ensure the wordmark stays fully visible */
  /* Mobile menu snaps open/closed — no slide, stagger, or icon morph tween. */
  .co-navlinks-wrap, .co-navlink, .co-menu-divider, .co-nav-cta,
  .co-burger__bars, .co-burger__bars::before, .co-burger__bars::after { transition: none; }
}
