/* Tessera Infrastructure — landing page */
:root {
  --ink: #1e1f22;
  --gray-400: #8c8d92;
  --gray-300: #b4b5b8;
  --gray-200: #d8d9db;
  --white: #ffffff;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--white);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2 { margin: 0; font-weight: 400; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--gray-300); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(30, 31, 34, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.07);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .3s; }
.site-header.scrolled .header-inner { height: 68px; }
/* ---------- Animated logo ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { height: 44px; width: 44px; overflow: visible; flex: none; }
.brand-mark .tile {
  transform-box: fill-box;
  transform-origin: center;
  /* intro: tiles drop into place, top row first; then a light wave every few seconds */
  animation:
    tile-in .7s cubic-bezier(.2, .9, .25, 1.25) both,
    tile-glow 6s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 110ms + 150ms),
    calc(var(--i) * 140ms + 1.6s);
  transition: translate .45s var(--ease);
}
.brand-mark .tile-open { animation-name: tile-in, tile-pulse; }
.brand:hover .brand-mark .tile,
.brand:focus-visible .brand-mark .tile {
  translate: calc(var(--dx) * 2.4px) calc(var(--dy) * 2.4px);
}
@keyframes tile-in {
  0%   { opacity: 0; scale: .2; }
  100% { opacity: 1; scale: 1; }
}
@keyframes tile-glow {
  0%, 18%, 100% { filter: brightness(1); }
  9%            { filter: brightness(1.55) drop-shadow(0 0 2px rgba(255,255,255,.7)); }
}
@keyframes tile-pulse {
  0%, 100% { opacity: 1; scale: 1; }
  50%      { opacity: .45; scale: .82; }
}

.brand-word { position: relative; display: block; height: 30px; }
.brand-word img {
  height: 100%; width: auto;
  animation: word-in 1s var(--ease) .55s both;
}
/* silver sheen that sweeps across the letters */
.brand-word::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.95) 50%, transparent 65%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  -webkit-mask: url("assets/tessera-wordmark.png") left center / contain no-repeat;
          mask: url("assets/tessera-wordmark.png") left center / contain no-repeat;
  animation: sheen 6s ease-in-out 1.9s infinite;
  pointer-events: none;
}
@keyframes word-in {
  from { opacity: 0; transform: translateX(-10px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes sheen {
  0%   { background-position: 100% 0; opacity: 1; }
  30%  { background-position: 0% 0; opacity: 1; }
  31%, 100% { background-position: 0% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark .tile, .brand-word img, .brand-word::after { animation: none !important; }
  .brand-word::after { display: none; }
}
.nav-cta {
  text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.35); padding: 11px 18px; border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--white); color: var(--ink); }
@media (max-width: 520px) {
  .brand { gap: 9px; }
  .brand-mark { height: 36px; width: 36px; }
  .brand-word { height: 24px; }
  .nav-cta { padding: 9px 14px; font-size: 12px; }
}

/* ---------- Hero ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 1px;
  flex: none;
}

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 80px;
  background:
    radial-gradient(900px 700px at 74% 46%, rgba(120,128,140,.10), transparent 65%),
    radial-gradient(1400px 900px at 20% 110%, rgba(60,64,72,.35), transparent 60%),
    linear-gradient(180deg, #111214 0%, #17181b 60%, #1e1f22 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero-globe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { position: relative; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 84px);
  line-height: 1.04;
  letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(100deg, #ffffff 0%, #c9ccd2 45%, #8f939b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
@media (max-width: 820px) {
  .hero { justify-content: flex-end; padding-bottom: 18vh; }
  .hero-globe { opacity: .9; }
}

/* ---------- Get in Touch popup ---------- */
button.nav-cta { background: transparent; font-family: inherit; line-height: 1.2; cursor: pointer; }
.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;
}
.contact-dialog {
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  color: var(--white);
  background: #1a1b1e;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.contact-dialog::backdrop { background: rgba(8,9,10,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.contact-dialog[open] { animation: dialog-in .35s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.contact-form { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 36px 32px 28px; }
.contact-form h2 { font-family: var(--serif); font-size: 30px; line-height: 1.1; padding-right: 32px; }
.dialog-sub { color: var(--gray-300); font-size: 16px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.field-row input {
  flex: 1 1 200px; min-width: 0;
  font: inherit; font-size: 16px; color: var(--white);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius);
  padding: 12px 14px;
}
.field-row input::placeholder { color: var(--gray-400); }
.field-row input:focus { outline: none; border-color: var(--gray-300); }
.submit-btn {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); background: var(--white);
  border: 0; border-radius: var(--radius); padding: 12px 22px; cursor: pointer;
  transition: background .2s;
}
.submit-btn:hover { background: var(--gray-200); }
.submit-btn:disabled { opacity: .6; cursor: default; }
.dialog-close {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px;
  font-size: 26px; line-height: 1; color: var(--gray-300);
  background: none; border: 0; border-radius: var(--radius); cursor: pointer;
}
.dialog-close:hover { color: var(--white); }
.form-status { min-height: 1.4em; font-size: 15px; color: var(--gray-200); }
.form-status.error { color: #f0a8a8; }
.contact-form.sent .field-row { display: none; }
@media (prefers-reduced-motion: reduce) { .contact-dialog[open] { animation: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid rgba(255,255,255,.08); color: var(--gray-400); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; font-size: 13px; }
.footer-logo { height: 28px; width: auto; opacity: .85; }
