/* =========================================================
   Profitrift — main stylesheet
   Fonts: Gloock (display) + Chivo (body/UI)
   Theme: Light, editorial, trustworthy
   ========================================================= */

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

:root {
  /* --- Palette (OKLCH — perceptually uniform) --- */
  --bg:             oklch(98.5% 0.006 75);
  --surface:        oklch(96.5% 0.008 75);
  --surface2:       oklch(94% 0.010 75);
  --border:         oklch(88% 0.008 75);
  --border-strong:  oklch(78% 0.012 70);

  --text:           oklch(16% 0.015 260);
  --text-muted:     oklch(46% 0.010 250);
  --text-faint:     oklch(68% 0.007 250);

  --accent:         oklch(57% 0.155 58);   /* amber — decorative */
  --accent-dark:    oklch(42% 0.120 58);   /* dark amber — WCAG AA on white */
  --accent-border:  oklch(76% 0.070 62);   /* amber border tone */
  --accent-bg:      oklch(96% 0.018 75);   /* faint amber surface */

  --green:          oklch(42% 0.130 145);
  --red:            oklch(45% 0.170 25);

  /* --- Typography --- */
  --font-display: 'Gloock', Georgia, 'Times New Roman', serif;
  --font-body:    'Chivo', system-ui, -apple-system, sans-serif;

  /* --- Spacing scale (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;

  /* --- Misc --- */
  --radius:   3px;
  --radius-lg: 6px;
  --max-w:    1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* =========================================================
   Navigation
   ========================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(98.5% 0.006 75 / 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.2s;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px oklch(16% 0.015 260 / 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: oklch(72% 0.16 58);
  color: oklch(97% 0.004 75);
  border-color: oklch(72% 0.16 58);
}

.btn--primary:hover {
  background: oklch(66% 0.16 58);
  border-color: oklch(66% 0.16 58);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--outline:hover {
  border-color: var(--text);
}

/* =========================================================
   Hero section
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: var(--sp-16) var(--sp-6) var(--sp-12);
}

/* Concentric circle geometry — ambient decoration, top right */
.hero::before {
  content: "";
  position: absolute;
  top: -15%;
  right: -6%;
  width: min(52vw, 600px);
  height: min(52vw, 600px);
  border-radius: 50%;
  border: 1px solid oklch(88% 0.014 72);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  top: -28%;
  right: -17%;
  width: min(76vw, 840px);
  height: min(76vw, 840px);
  border-radius: 50%;
  border: 1px solid oklch(91% 0.009 72);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--sp-6);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-6);
  max-width: 15ch;
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 50ch;
  margin-bottom: var(--sp-8);
}

.hero-cta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--sp-8);
}

.hero-proof {
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* WebGPU canvas — fills hero, sits behind text */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#hero-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Once WebGPU is live, retire the CSS circles */
.hero--webgpu::before,
.hero--webgpu::after {
  display: none;
}

/* Dark hero — text and button overrides */
.hero--webgpu .hero-badge {
  color: oklch(78% 0.13 60);
  border-color: oklch(38% 0.08 60);
}

.hero--webgpu .hero-headline {
  color: oklch(97% 0.004 75);
}

.hero--webgpu .hero-tagline {
  color: oklch(68% 0.008 240);
}

.hero--webgpu .hero-proof {
  color: oklch(82% 0.006 240);
}

.hero--webgpu .btn--primary {
  background: oklch(72% 0.16 58);
  color: oklch(97% 0.004 75);
  border-color: oklch(72% 0.16 58);
}

.hero--webgpu .btn--primary:hover {
  background: oklch(66% 0.16 58);
  border-color: oklch(66% 0.16 58);
}

.hero--webgpu .btn--outline {
  color: oklch(97% 0.004 75);
  border-color: oklch(38% 0.006 240);
}

.hero--webgpu .btn--outline:hover {
  border-color: oklch(70% 0.006 240);
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: var(--sp-12) var(--sp-6) var(--sp-12);
  }

  .hero::before,
  .hero::after {
    display: none;
  }
}

/* =========================================================
   Shared section layout
   ========================================================= */

.section {
  padding: clamp(4rem, 8vw, 6rem) var(--sp-6);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--sp-12);
  line-height: 1.7;
  font-size: 1rem;
}

.section--alt {
  background: var(--surface);
}

/* =========================================================
   How It Works — editorial numbered layout
   ========================================================= */

.steps-grid {
  display: flex;
  flex-direction: column;
}

.step-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--sp-8);
  align-items: start;
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border);
}

.step-card:last-child {
  border-bottom: 1px solid var(--border);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  padding-top: 0.1rem;
  display: block;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 56ch;
}

@media (max-width: 480px) {
  .step-card {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .step-number {
    font-size: 1.75rem;
  }
}

/* =========================================================
   Services section
   ========================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px oklch(16% 0.015 260 / 0.06);
}

.service-icon {
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
  display: block;
  line-height: 1;
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.service-price {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--sp-4);
  display: block;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* =========================================================
   Verticals section
   ========================================================= */

.verticals-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.vertical-tag {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
  cursor: default;
}

.vertical-tag:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* =========================================================
   About section
   ========================================================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.profile-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: border-color 0.2s;
}

.profile-card--featured {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}

.profile-card:hover {
  border-color: var(--border-strong);
}

.profile-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
  margin-bottom: var(--sp-4);
}

.profile-img--bg {
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: var(--surface2);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--sp-1);
  line-height: 1.3;
}

.profile-role {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--sp-3);
  display: block;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
}

.tech-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.625rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* =========================================================
   Contact section
   ========================================================= */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 720px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  line-height: 1.7;
  max-width: 48ch;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: 0.9rem;
}

.contact-detail-item strong {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-detail-item span,
.contact-detail-item a {
  color: var(--text-muted);
}

.contact-detail-item a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.625rem var(--sp-3);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-faint);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px oklch(65% 0.12 62 / 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-submit {
  align-self: flex-start;
}

.contact-submit[aria-busy="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* SSE result message */
.contact-result {
  padding: 0.75rem var(--sp-3);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-top: var(--sp-2);
}

.contact-result--success {
  background: oklch(42% 0.130 145 / 0.08);
  border: 1px solid oklch(55% 0.130 145);
  color: var(--green);
}

.contact-result--error {
  background: oklch(45% 0.170 25 / 0.08);
  border: 1px solid oklch(55% 0.170 25);
  color: var(--red);
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--text);
}
