/* ============================================================
   TimePilot — Company site (Direction B)
   "Cinematic dark / precision instrument"
   All rules scoped under .tpco to avoid colliding with the
   app's global Tailwind styles. System fonts only.
   ============================================================ */

/* Standalone static-site reset (page content is wrapped in .tpco) */
html, body { margin: 0; padding: 0; }
body { background: #141312; }

.tpco {
  /* Brand palette */
  --ink:        #0e0d0c;
  --charcoal:   #141312;
  --charcoal-2: #1b1917;
  --charcoal-3: #232019;
  --brown:      #462c16;
  --brass:      #c1921c;
  --gold:       #f5c518;
  --cream:      #ede4cf;
  --cream-dim:  #b7ad98;
  --cream-faint:#8a8171;

  /* Type */
  --display: "American Typewriter", "Courier New", Georgia, serif;
  --serif:   Georgia, "Times New Roman", serif;
  --mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale (fluid) */
  --step--1: clamp(0.78rem, 0.75rem + 0.2vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.25vw, 1.15rem);
  --step-1:  clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --step-2:  clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-3:  clamp(2.2rem, 1.7rem + 2.4vw, 3.9rem);
  --step-4:  clamp(2.6rem, 1.6rem + 3.9vw, 5.4rem);

  /* Spacing scale */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6rem;
  --s-7: 9rem;

  --measure: 62ch;
  --edge: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1240px;

  --line: rgba(237, 228, 207, 0.10);
  --line-strong: rgba(237, 228, 207, 0.18);

  position: relative;
  min-height: 100vh;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.tpco * { box-sizing: border-box; }

/* Subtle warm vignette across the page */
.tpco::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(193,146,28,0.10), transparent 60%),
    radial-gradient(80% 60% at 100% 110%, rgba(70,44,22,0.28), transparent 70%);
  mix-blend-mode: screen;
}

.tpco ::selection { background: var(--brass); color: var(--ink); }

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

.tpco :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.tpco .wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--edge);
  position: relative;
  z-index: 1;
}

/* ---------- Real logo mark (recoloured via mask) ---------- */
.tpco .brand-mark {
  flex: none;
  display: inline-block;
  width: 30px;
  height: 30px;
  background: linear-gradient(125deg, var(--gold), var(--brass) 60%, var(--brown));
  -webkit-mask: url(/assets/logo.svg) center / contain no-repeat;
  mask: url(/assets/logo.svg) center / contain no-repeat;
}

/* ---------- Reusable label / eyebrow ---------- */
.tpco .eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 var(--s-3);
}
.tpco .eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass);
  opacity: 0.7;
}

.tpco h1, .tpco h2, .tpco h3 { font-family: var(--display); font-weight: 400; }

/* ============================================================
   NAV
   ============================================================ */
.tpco .nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(20,19,18,0.9), rgba(20,19,18,0.55));
  border-bottom: 1px solid var(--line);
}
.tpco .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.tpco .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  letter-spacing: 0.02em;
  font-size: 1.15rem;
  color: var(--cream);
}
.tpco .brand small {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-faint);
  display: block;
  line-height: 1;
}
.tpco .nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.4rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.tpco .nav-links a { transition: color 0.25s ease; }
.tpco .nav-links a:hover { color: var(--gold); }
.tpco .nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.6em 1.1em;
  border-radius: 100px;
  color: var(--cream);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s;
}
.tpco .nav-cta:hover { border-color: var(--gold); color: var(--gold); }
.tpco .nav-links .desk-only { display: inline; }
@media (max-width: 720px) {
  .tpco .nav-links .desk-only { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.tpco .hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: grid;
  align-items: center;
  padding-block: var(--s-6) var(--s-5);
  overflow: hidden;
}
.tpco .hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 940px) {
  .tpco .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .tpco .hero { min-height: auto; padding-block: var(--s-5) var(--s-4); }
}
.tpco .hero h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
  color: var(--cream);
}
.tpco .hero h1 .accent {
  color: transparent;
  background: linear-gradient(100deg, var(--gold), var(--brass) 60%, var(--brown));
  -webkit-background-clip: text;
  background-clip: text;
  font-style: italic;
}
.tpco .hero-sub {
  font-size: var(--step-1);
  color: var(--cream-dim);
  max-width: 40ch;
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
  line-height: 1.5;
}
.tpco .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
.tpco .btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 1.6em;
  border-radius: 100px;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s;
}
.tpco .btn-primary {
  background: linear-gradient(120deg, var(--gold), var(--brass));
  color: var(--ink);
  box-shadow: 0 10px 40px -12px rgba(245,197,24,0.5);
  font-weight: 600;
}
.tpco .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 48px -12px rgba(245,197,24,0.65); }
.tpco .btn-primary .arw { transition: transform 0.25s ease; }
.tpco .btn-primary:hover .arw { transform: translateX(4px); }
.tpco .btn-ghost {
  color: var(--cream-dim);
  border: 1px solid var(--line-strong);
}
.tpco .btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

.tpco .hero-meta {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--cream-faint);
}
.tpco .hero-meta strong {
  display: block;
  color: var(--cream);
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0;
  margin-bottom: 0.15em;
}

/* ---- The dial / compass centerpiece ---- */
.tpco .dial-stage {
  display: grid;
  place-items: center;
  position: relative;
}
.tpco .dial-stage::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 130%;
  background: radial-gradient(closest-side, rgba(193,146,28,0.16), transparent 70%);
  pointer-events: none;
}
.tpco .dial {
  width: min(100%, 460px);
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.tpco .dial-ring-outer { transform-origin: 250px 250px; }
.tpco .dial-ring-mid   { transform-origin: 250px 250px; }
.tpco .dial-needle     { transform-origin: 250px 250px; }

@keyframes tpco-spin { to { transform: rotate(360deg); } }
@keyframes tpco-spin-rev { to { transform: rotate(-360deg); } }
@keyframes tpco-needle-sweep {
  0%   { transform: rotate(-32deg); }
  50%  { transform: rotate(28deg); }
  100% { transform: rotate(-32deg); }
}
@keyframes tpco-pulse-dot {
  0%,100% { opacity: 0.35; }
  50%     { opacity: 1; }
}
.tpco .dial-ring-outer { animation: tpco-spin 90s linear infinite; }
.tpco .dial-ring-mid   { animation: tpco-spin-rev 60s linear infinite; }
.tpco .dial-needle     { animation: tpco-needle-sweep 14s cubic-bezier(.45,0,.55,1) infinite; }
.tpco .dial-dot        { animation: tpco-pulse-dot 3.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .tpco .dial-ring-outer, .tpco .dial-ring-mid, .tpco .dial-needle, .tpco .dial-dot { animation: none; }
  .tpco .dial-needle { transform: rotate(-14deg); }
}

/* Short, wide viewports (most laptops): compress the hero so the whole
   thing — headline, subtext, buttons and stats — fits on one screen without
   the CTAs getting clipped at the fold. Large external monitors keep the
   full-size hero. Placed after the base .hero rules so it wins the cascade. */
@media (min-width: 941px) and (max-height: 1000px) {
  .tpco .hero {
    min-height: 0;
    padding-block: var(--s-4) var(--s-4);
  }
  .tpco .hero h1 { font-size: clamp(2.6rem, 1rem + 4.1vw, 4.9rem); }
  .tpco .hero-sub { margin-bottom: var(--s-3); max-width: 46ch; }
  .tpco .hero-actions { margin-top: 0; }
  .tpco .hero-meta { margin-top: var(--s-3); }
  .tpco .dial { width: min(100%, 400px); }
}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.tpco section { position: relative; z-index: 1; }
.tpco .band {
  padding-block: var(--s-7);
  border-top: 1px solid var(--line);
}
@media (max-width: 700px) { .tpco .band { padding-block: var(--s-6); } }

.tpco .section-head { max-width: 52ch; margin-bottom: var(--s-5); }
.tpco .section-head h2 {
  font-size: var(--step-3);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  color: var(--cream);
}

/* ---------- Reveal on scroll ---------- */
.tpco .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(.2,.6,.2,1), transform 0.9s cubic-bezier(.2,.6,.2,1);
}
.tpco .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .tpco .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   BELIEF / ETHOS
   ============================================================ */
.tpco .belief-lead {
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.28;
  color: var(--cream);
  max-width: 24ch;
  text-wrap: balance;
  margin: 0 0 var(--s-5);
}
.tpco .belief-lead em { color: var(--gold); font-style: italic; }

.tpco .principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
@media (max-width: 760px) { .tpco .principles { grid-template-columns: 1fr; } }
.tpco .principle {
  background: var(--charcoal);
  padding: var(--s-4);
}
.tpco .principle .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--brass);
}
.tpco .principle h3 {
  font-size: var(--step-1);
  margin: var(--s-2) 0 var(--s-1);
  color: var(--cream);
}
.tpco .principle p {
  color: var(--cream-dim);
  font-size: var(--step-0);
  margin: 0;
  max-width: 34ch;
  line-height: 1.55;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.tpco .products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
@media (max-width: 820px) { .tpco .products { grid-template-columns: 1fr; } }

.tpco .product {
  position: relative;
  background: linear-gradient(160deg, var(--charcoal-2), var(--charcoal));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.tpco .product:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tpco .product::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 100% 0%, rgba(193,146,28,0.14), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}
.tpco .product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--s-3);
  position: relative;
}
.tpco .product-icon {
  width: 46px; height: 46px;
  color: var(--gold);
  flex: none;
}
.tpco .status {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: 1px solid var(--line-strong);
  padding: 0.4em 0.8em;
  border-radius: 100px;
  white-space: nowrap;
}
.tpco .status .live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(245,197,24,0.6);
  animation: tpco-live-pulse 2.4s ease-out infinite;
}
.tpco .status.dev .live {
  background: var(--brass);
  animation: none;
  opacity: 0.9;
}
@keyframes tpco-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,197,24,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(245,197,24,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,197,24,0); }
}
@media (prefers-reduced-motion: reduce) { .tpco .status .live { animation: none; } }

.tpco .product h3 {
  font-size: var(--step-2);
  margin: 0 0 0.4rem;
  color: var(--cream);
  letter-spacing: 0.01em;
  position: relative;
}
.tpco .product .tagline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s-3);
  position: relative;
}
.tpco .product p.desc {
  color: var(--cream-dim);
  margin: 0 0 var(--s-3);
  max-width: 42ch;
  line-height: 1.6;
  position: relative;
}
.tpco .product .feats {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-4);
  display: grid;
  gap: 0.5rem;
  position: relative;
}
.tpco .product .feats li {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--cream-faint);
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.tpco .product .feats li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--brass);
  transform: rotate(45deg);
  flex: none;
}
.tpco .product-link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  align-self: flex-start;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.4em;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s;
  position: relative;
}
.tpco .product-link:hover { color: var(--gold); border-color: var(--gold); gap: 1em; }

/* ============================================================
   ABOUT
   ============================================================ */
.tpco .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .tpco .about-grid { grid-template-columns: 1fr; gap: var(--s-4); } }
.tpco .about-copy p {
  color: var(--cream-dim);
  max-width: var(--measure);
  margin: 0 0 var(--s-3);
  line-height: 1.7;
}
.tpco .about-copy p.big {
  font-family: var(--display);
  font-size: var(--step-1);
  color: var(--cream);
  line-height: 1.4;
  max-width: 32ch;
}
.tpco .about-title {
  font-family: var(--display);
  font-size: var(--step-3);
  line-height: 1.06;
  color: var(--cream);
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
.tpco .facts {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--charcoal-2);
}
.tpco .fact {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 1rem;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.tpco .fact:last-child { border-bottom: 0; }
.tpco .fact dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.tpco .fact dd {
  margin: 0;
  color: var(--cream);
  font-size: var(--step-0);
}
.tpco .fact dd a { border-bottom: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.tpco .fact dd a:hover { color: var(--gold); border-color: var(--gold); }

/* ============================================================
   CONTACT
   ============================================================ */
.tpco .contact {
  text-align: center;
  padding-block: var(--s-7);
  background: radial-gradient(90% 120% at 50% 0%, rgba(70,44,22,0.35), transparent 60%);
  border-top: 1px solid var(--line);
}
.tpco .contact h2 {
  font-size: var(--step-3);
  line-height: 1.08;
  margin: 0 auto var(--s-3);
  max-width: 18ch;
  text-wrap: balance;
  color: var(--cream);
}
.tpco .contact p {
  color: var(--cream-dim);
  max-width: 46ch;
  margin: 0 auto var(--s-4);
}
.tpco .mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--display);
  font-size: var(--step-2);
  color: var(--gold);
  border-bottom: 1px solid rgba(245,197,24,0.35);
  padding-bottom: 0.15em;
  transition: border-color 0.25s ease;
  word-break: break-word;
}
.tpco .mail:hover { border-color: var(--gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.tpco footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-5) var(--s-4);
  position: relative;
  z-index: 1;
}
.tpco .foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: flex-start;
}
.tpco .foot-brand { max-width: 32ch; }
.tpco .foot-brand p {
  color: var(--cream-faint);
  font-size: var(--step--1);
  margin: var(--s-2) 0 0;
  line-height: 1.6;
}
.tpco .foot-cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 4.5rem);
}
.tpco .foot-col h4 {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin: 0 0 var(--s-2);
  font-weight: 400;
}
.tpco .foot-col a {
  display: block;
  color: var(--cream-dim);
  font-size: var(--step--1);
  margin-bottom: 0.55rem;
  transition: color 0.2s ease;
}
.tpco .foot-col a:hover { color: var(--gold); }
.tpco .foot-bottom {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--cream-faint);
}

/* Skip link */
.tpco .skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.7em 1.2em;
  font-family: var(--mono);
  font-size: 0.75rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.tpco .skip:focus { left: 0; }
