/* ============================================================
   Giles Digital Studios — style.css
   Palette: #1b1b23 / #ee843c / #704f3d / #8c9494 / #8a8c94 / #545c5c
   Type: Barlow Semi Condensed (display) + Barlow (body)
   ============================================================ */

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

html {
  font-size: 16px;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul { list-style: none; }

a { color: inherit; }

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand palette as OKLCH */
  --bg:             oklch(14%  0.010 270);   /* #1b1b23 */
  --orange:         oklch(68%  0.165  42);   /* #ee843c */
  --brown:          oklch(40%  0.060  38);   /* #704f3d */
  --grey-mid:       oklch(62%  0.009 195);   /* #8c9494 */
  --grey-cool:      oklch(60%  0.010 265);   /* #8a8c94 */
  --grey-dark:      oklch(38%  0.010 195);   /* #545c5c */

  /* Derived */
  --bg-clndb:       oklch(17%  0.010 270);   /* slightly lifted dark */
  --bg-hsable:      oklch(15%  0.016  38);   /* deep earthy tint */
  --bg-footer:      oklch(12%  0.008 270);

  --text-primary:   oklch(92%  0.007 270);   /* near-white, brand-tinted */
  --text-secondary: oklch(62%  0.009 195);   /* --grey-mid */
  --text-muted:     oklch(45%  0.008 200);

  --rule:           oklch(22%  0.010 270);   /* subtle dividers */
  --rule-warm:      oklch(22%  0.012  38);

  /* Spacing — 4pt base */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;

  /* Fluid display sizes */
  --text-product:  clamp(3rem,   5vw + 0.5rem, 5.5rem);
  --text-display:  clamp(3.5rem, 7vw + 0.5rem, 7.5rem);
  --text-contact:  clamp(3rem,   6vw + 0.5rem, 6rem);

  /* Type families */
  --font-display: 'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, sans-serif;

  /* Nav height — used to offset hero min-height */
  --nav-h: 64px;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background-color: var(--bg);
}

/* Dark bg text compensation: bump line-height + tracking (typography.md) */
p {
  line-height: 1.75;
  letter-spacing: 0.01em;
}

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

/* ─── Animations ─────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity  0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

[data-delay="1"] { transition-delay: 0.10s; }
[data-delay="2"] { transition-delay: 0.22s; }
[data-delay="3"] { transition-delay: 0.36s; }
[data-delay="4"] { transition-delay: 0.50s; }

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Shared ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

.eyebrow-orange { color: var(--orange); }
.eyebrow-muted  { color: var(--grey-mid); }

/* ─── Nav / Header ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background-color: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-company {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: var(--sp-8);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-primary);
}

/* ─── Hero ───────────────────────────────────────────────── */
.section-hero {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: var(--sp-32) var(--sp-8);
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero-title-col {
  /* Logo + big display heading stacked */
}

.hero-logo {
  height: 80px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: var(--sp-8);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  text-wrap: balance;
}

.hero-name-line {
  display: block;
}

.hero-llc {
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  vertical-align: top;
  padding-top: 0.22em;
}

.hero-body-col {
  padding-top: var(--sp-6);
}

.hero-body-col .eyebrow {
  margin-bottom: var(--sp-8);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--orange);
  margin-bottom: var(--sp-8);
}

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 44ch;
  margin-bottom: var(--sp-12);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background-color: var(--orange);
  text-decoration: none;
  padding: var(--sp-3) var(--sp-6);
  border-radius: 3px;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.btn-primary:hover {
  background-color: oklch(73% 0.165 42);
}

.btn-ghost {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--grey-dark);
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-secondary);
}

/* ─── Products: Shared ───────────────────────────────────── */
.product-section {
  padding: var(--sp-32) var(--sp-8);
}

.product-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  gap: var(--sp-16);
  align-items: center;
}

.product-content-col .eyebrow {
  margin-bottom: var(--sp-4);
}

.product-heading {
  font-family: var(--font-display);
  font-size: var(--text-product);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-wrap: balance;
  margin: var(--sp-3) 0 var(--sp-6);
}

.product-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: var(--sp-8);
}

.product-logo {
  max-width: 320px;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ─── Products: CLNDB ────────────────────────────────────── */
.clndb-section {
  background-color: var(--bg-clndb);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.clndb-inner {
  grid-template-columns: 2fr 3fr;
}

.product-visual-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12);
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.product-status::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--orange);
}

/* ─── Products: HSAble ───────────────────────────────────── */
.hsable-section {
  background-color: var(--bg-hsable);
  border-top: 1px solid var(--rule-warm);
  border-bottom: 1px solid var(--rule-warm);
}

.hsable-inner {
  grid-template-columns: 1fr 1fr;
}

.product-logo-inline {
  max-width: 480px;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: var(--sp-4);
}

.product-sub-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--orange);
  margin-bottom: var(--sp-8);
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--orange);
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.product-link:hover {
  color: var(--orange);
}

.hsable-screenshot-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-frame {
  width: 100%;
  max-width: 380px;
}

.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    0  4px 24px oklch(5% 0.010 270 / 0.35),
    0 24px 64px oklch(5% 0.010 270 / 0.50),
    0 48px 96px oklch(5% 0.010 270 / 0.30);
}

/* ─── Contact ────────────────────────────────────────────── */
.section-contact {
  padding: var(--sp-32) var(--sp-8);
  border-top: 1px solid var(--rule);
}

.contact-inner {
  max-width: 1360px;
  margin: 0 auto;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: var(--text-contact);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
  margin-bottom: var(--sp-8);
}

.contact-email {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--orange);
  text-decoration: none;
  margin-bottom: var(--sp-6);
  overflow-wrap: break-word;
  word-break: break-all;
  transition: opacity 0.2s ease-out;
}

.contact-email:hover {
  opacity: 0.75;
}

.contact-note {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 50ch;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--rule);
  padding: var(--sp-6) var(--sp-8);
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--grey-dark);
}

/* ─── Responsive: Tablet ─────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-12);
  }

  .hero-title-col {
    /* Full width heading */
  }

  .hero-logo {
    height: 64px;
  }

  .hero-body-col {
    padding-top: 0;
  }

  .hero-desc {
    max-width: 58ch;
  }

  .clndb-inner {
    grid-template-columns: 1fr;
  }

  .product-logo-stage {
    padding: var(--sp-8);
  }

  .product-logo {
    max-width: 160px;
    max-height: 120px;
  }

  .hsable-inner {
    grid-template-columns: 1fr;
  }

  .hsable-screenshot-col {
    order: -1; /* Screenshot above content on tablet */
    justify-content: flex-start;
  }

  .screenshot-frame {
    max-width: 420px;
  }

  .product-desc {
    max-width: 65ch;
  }
}

/* ─── Responsive: Mobile ─────────────────────────────────── */
@media (max-width: 600px) {
  .nav {
    padding: 0 var(--sp-6);
  }

  .nav-company {
    font-size: var(--text-sm);
  }

  .section-hero {
    padding: var(--sp-16) var(--sp-6);
  }

  .hero-logo {
    height: 52px;
  }

  .hero-desc {
    font-size: var(--text-base);
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-6);
  }

  .product-section {
    padding: var(--sp-16) var(--sp-6);
  }

  .section-contact {
    padding: var(--sp-16) var(--sp-6);
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--sp-2);
    text-align: center;
  }

  /* Hide entire CLNDB visual column on mobile — heading + status identify the product */
  .clndb-section .product-visual-col {
    display: none;
  }
}

/* ─── Large screens ──────────────────────────────────────── */
@media (min-width: 1600px) {
  .section-hero,
  .product-section,
  .section-contact {
    padding-top: calc(var(--sp-32) * 1.25);
    padding-bottom: calc(var(--sp-32) * 1.25);
  }
}
