/* ================================================
   Design tokens
   ================================================ */
:root {
  --black:      #0c0c0b;
  --off-white:  #f0efeb;
  --gray-100:   #e2e1db;
  --gray-300:   #b4b3ac;
  --gray-500:   #767570;
  --gray-700:   #3a3935;
  --signal:     #096d78;
  --moss-green: #647862;

  --hero-px:    24px;
  --sect-px:    24px;

  --shadow-frame: 0 48px 120px rgba(0, 0, 0, 0.7), 0 8px 32px rgba(0, 0, 0, 0.38);
  --shadow-card:  0 20px 60px rgba(0, 0, 0, 0.34), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ================================================
   Reset & base
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--black);
  background: #181715;
  font-family: "Space Grotesk", "Helvetica Neue", "Arial", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3, blockquote { margin: 0; }

/* ================================================
   Skip link
   ================================================ */
.skip-link {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 100;
  padding: 10px 13px;
  border-radius: 6px;
  color: #fff;
  background: var(--black);
  font-size: 0.84rem;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* ================================================
   Page shell
   ================================================ */
.page-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}

/* ================================================
   Browser frame
   ================================================ */
.browser-frame {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-frame);
}

.browser-chrome {
  display: grid;
  grid-template-columns: 96px minmax(120px, 1fr) 96px;
  gap: 18px;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  background: #101010;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls,
.chrome-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-controls span,
.chrome-actions span {
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3e3d3a;
}
.window-controls span:nth-child(1) { background: #c96f5f; }
.window-controls span:nth-child(2) { background: #d0a24f; }
.window-controls span:nth-child(3) { background: #6fa36c; }

.address-bar {
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.chrome-actions { justify-content: flex-end; }

/* ================================================
   Site panel
   ================================================ */
.site-panel { background: var(--off-white); }

/* ================================================
   Site header — dark, seamless with hero
   ================================================ */
.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px var(--hero-px);
  background: var(--black);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 17px; height: 17px;
  border-radius: 4px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 500;
}
.nav-links a { padding: 4px 0; transition: color 140ms ease; }
.nav-links a:hover,
.nav-links a:focus-visible { color: #fff; outline: none; }
.nav-links .active { color: rgba(255, 255, 255, 0.88); }

.icon-button {
  justify-self: end;
  display: inline-grid;
  width: 30px; height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 140ms ease;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.18); }

/* ================================================
   Hero section
   ================================================ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 540px;
  color: #fff;
  background: var(--black);
}

/* Background image with gradient overlay */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(175deg,
      rgba(5, 5, 4, 0.88) 0%,
      rgba(5, 5, 4, 0.22) 22%,
      rgba(5, 5, 4, 0.18) 52%,
      rgba(5, 5, 4, 0.72) 100%
    ),
    url("assets/glacial-apex-portfolio-hero.png") center / cover no-repeat;
  filter: grayscale(0.28) contrast(1.1) brightness(0.84);
  transform: scale(1.015);
}

/* Film grain texture */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
}

/* ── Viewfinder corner brackets ─────────── */
.vf-corner {
  position: absolute;
  z-index: 4;
  width: 20px; height: 20px;
  pointer-events: none;
}
.vf-tl { top: 13px; left: 13px; border-top: 1.5px solid rgba(255,255,255,0.46); border-left:  1.5px solid rgba(255,255,255,0.46); }
.vf-tr { top: 13px; right: 13px; border-top: 1.5px solid rgba(255,255,255,0.46); border-right: 1.5px solid rgba(255,255,255,0.46); }
.vf-bl { bottom: 13px; left: 13px; border-bottom: 1.5px solid rgba(255,255,255,0.46); border-left:  1.5px solid rgba(255,255,255,0.46); }
.vf-br { bottom: 13px; right: 13px; border-bottom: 1.5px solid rgba(255,255,255,0.46); border-right: 1.5px solid rgba(255,255,255,0.46); }

/* ── Focus crosshairs ───────────────────── */
.xhair {
  position: absolute;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  user-select: none;
  animation: xhair-pulse 4s ease-in-out infinite;
}
.xh1 { top: 36%; left: 20%; animation-delay: 0s; }
.xh2 { top: 54%; left: 48%; animation-delay: 1.3s; }
.xh3 { top: 28%; left: 66%; animation-delay: 2.6s; }

@keyframes xhair-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Hero grid layout ───────────────────── */
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  min-height: 540px;
  padding: 22px var(--hero-px) 26px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

/* ── Hero brand headline ────────────────── */
.hero-brand { padding-top: 2px; }

.display-word {
  display: block;
  font-size: clamp(4rem, 10.5vw, 7.8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: #fff;
}
.hero-sub {
  display: block;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.005em;
}

/* ── Hero caption ───────────────────────── */
.hero-caption p {
  font-size: 0.81rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.58);
}
.hero-caption p:first-child { color: rgba(255, 255, 255, 0.76); }

/* ── Social proof ───────────────────────── */
.social-proof {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  padding-top: 2px;
}

.avatar-stack {
  display: flex;
  align-items: center;
}
.av {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  margin-left: -7px;
  flex-shrink: 0;
}
.av:first-child { margin-left: 0; }
.av1 { background: radial-gradient(circle at 38% 34%, #d2ac86, #a07856); }
.av2 { background: radial-gradient(circle at 38% 34%, #8aa2b8, #5a7898); }
.av3 { background: radial-gradient(circle at 38% 34%, #aa8878, #7a6058); }
.av4 { background: radial-gradient(circle at 38% 34%, #a8b8c4, #7898a8); }

.social-proof > span {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

/* ── Floating product card ──────────────── */
.product-card {
  width: 194px;
  background: rgba(250, 249, 245, 0.93);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 14px;
  padding: 14px;
  color: var(--black);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: card-float 5s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.pc-header { margin-bottom: 10px; }
.pc-name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}
.pc-sub {
  display: block;
  font-size: 0.67rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.pc-preview {
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 10px;
  background: linear-gradient(140deg, #1a2e1a 0%, #3e5838 55%, #647862 100%);
  height: 82px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}
.pc-icon {
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1;
  flex-shrink: 0;
}
.pc-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.pc-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}
.b1 { width: 84%; }
.b2 { width: 56%; }
.b3 { width: 74%; }

.pc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pc-year {
  font-size: 0.65rem;
  color: var(--gray-500);
}
.pc-cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 140ms ease;
}
.pc-cta:hover { background: var(--gray-700); }

/* ================================================
   Ticker strip
   ================================================ */
.ticker-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px var(--sect-px);
  background: var(--off-white);
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
}

.ticker-mask {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  animation: scroll-left 30s linear infinite;
  will-change: transform;
}

.ti {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.01em;
}
.ts {
  color: var(--gray-300);
  font-size: 0.9rem;
  flex-shrink: 0;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--gray-700);
  white-space: nowrap;
}
.tr-stars { color: #e8b030; font-size: 0.7rem; letter-spacing: -0.5px; }
.ticker-rating strong { font-weight: 600; }

/* ================================================
   Editorial quote section
   ================================================ */
.editorial {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 32px;
  padding: 58px var(--sect-px) 54px;
  background: var(--off-white);
  border-bottom: 1px solid var(--gray-100);
  align-items: start;
}

.editorial-byline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}
.editorial-byline strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}
.editorial-byline span {
  font-size: 0.73rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.editorial-quote {
  font-size: clamp(1.72rem, 3.9vw, 3.2rem);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.036em;
  color: var(--black);
  quotes: none;
}

/* ================================================
   Apps section
   ================================================ */
.app-strip {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 28px;
  align-items: start;
  padding: 42px var(--sect-px);
  border-bottom: 1px solid var(--gray-100);
  background: var(--off-white);
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.section-label h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  color: var(--black);
}

.apps-list {
  display: grid;
  border-top: 1px solid var(--gray-100);
}

.app-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 84px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.app-item > div { min-width: 0; }

.app-icon {
  display: inline-grid;
  width: 40px; height: 40px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.moss-icon  { background: linear-gradient(135deg, #1a2e1a 0%, #647862 100%); }
.hyper-icon { background: linear-gradient(135deg, #111318 0%, #096d78 100%); }

.app-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--black);
  letter-spacing: -0.01em;
}
.app-item p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.42;
}

.app-badge {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--gray-100);
  background: #fff;
  color: var(--gray-700);
  font-size: 0.71rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease;
}
.app-badge-link:hover,
.app-badge-link:focus-visible {
  border-color: var(--signal);
  color: var(--signal);
  outline: none;
}

/* ================================================
   Company note / About
   ================================================ */
.company-note {
  padding: 42px var(--sect-px);
  background: var(--off-white);
}
.company-note h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--black);
}
.company-note p:not(.eyebrow) {
  font-size: 0.92rem;
  color: var(--gray-500);
  line-height: 1.58;
  max-width: 540px;
}

/* ================================================
   Footer
   ================================================ */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 20px 4px 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
}
.footer p { margin: 0; }
.footer a {
  color: rgba(255, 255, 255, 0.52);
  font-weight: 500;
  transition: color 140ms ease;
}
.footer a:hover { color: rgba(255, 255, 255, 0.82); }

/* ================================================
   Responsive — tablet (≤ 900px)
   ================================================ */
@media (max-width: 900px) {
  .page-shell { padding: 16px; }

  .browser-chrome {
    grid-template-columns: 72px 1fr 54px;
    gap: 10px;
  }

  .site-header {
    grid-template-columns: auto 30px;
    justify-content: start;
    column-gap: 12px;
    padding: 13px 16px;
  }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 18px;
    padding-top: 10px;
  }
  .icon-button { grid-column: 2; grid-row: 1; justify-self: end; }

  .hero { min-height: 460px; }
  .hero-grid {
    grid-template-columns: 1fr 178px;
    min-height: 460px;
    padding: 16px 16px 20px;
  }

  .editorial {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 42px 16px;
  }
  .editorial-byline { flex-direction: row; align-items: center; gap: 12px; }

  .app-strip { grid-template-columns: 1fr; gap: 14px; padding: 34px 16px; }
  .company-note { padding: 34px 16px; }
  .ticker-strip { padding: 10px 16px; }
}

/* ================================================
   Responsive — mobile (≤ 600px)
   ================================================ */
@media (max-width: 600px) {
  .page-shell { padding: 8px; }

  .browser-chrome {
    grid-template-columns: 64px 1fr 42px;
    padding-inline: 10px;
  }
  .chrome-actions span:nth-child(2),
  .chrome-actions span:nth-child(3) { display: none; }

  .hero { min-height: 0; }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px 14px 20px;
    gap: 24px;
  }
  .hero-left  { order: 2; }
  .hero-right {
    order: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .display-word { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-caption { display: none; }
  .product-card { display: none; }

  .editorial { padding: 30px 14px; }
  .editorial-quote { font-size: clamp(1.44rem, 6.5vw, 1.9rem); }

  .app-strip { padding: 24px 14px; }
  .company-note { padding: 24px 14px; }

  .app-item {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
  }
  .app-badge { grid-column: 2; width: fit-content; }

  .ticker-rating { display: none; }
}

/* ================================================
   Reduced motion
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
