/* ============================================================
   TRUE FORK — styles.css
   truefork.dev
   Direction C: Warm luxury dark
   ============================================================ */

:root {
  --draw-speed: 1.2s;

  /* ---- Colors ---- */
  --color-bg:         #1c1714;
  --color-surface:    #231e1a;
  --color-surface-2:  #2b2520;
  --color-border:     rgba(240, 235, 228, 0.08);
  --color-border-mod: rgba(240, 235, 228, 0.15);

  --color-text:       #f0ebe4;
  --color-text-muted: #a8968d;
  --color-text-dim:   #6b5c55;

  --color-accent:     #8B3052;
  --color-teal:       #5B8A9E;
  --color-green:      #6A9060;
  --color-glow:       rgba(139, 48, 82, 0.22);

  /* Logo */
  --logo-true: #e8ddd6;
  --logo-fork: #c4697e;

  /* ---- Typography ---- */
  --font: 'Belleza', Georgia, serif;

  /* ---- Spacing ---- */
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* ---- Layout ---- */
  --max-w:    1100px;
  --radius:   8px;
  --radius-lg: 16px;
  --diag:     80px;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 1rem;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22300%22 height=%22300%22%3E%3Cfilter id=%22noise%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.75%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22300%22 height=%22300%22 filter=%22url(%23noise)%22/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }

/* ============================================================
   HEADER / NAV
   ============================================================ */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 23, 20, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-border);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* ---- Logo ---- */

.logo-link {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: auto;
  height: 130px;
  flex-shrink: 0;
  color: var(--logo-fork);
}

@keyframes tine-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0%   0 0); }
}

.logo-icon.is-drawing .tine-left {
  animation: tine-reveal calc(var(--draw-speed) * 0.7)
             cubic-bezier(0.4, 0, 0.2, 1) 0s backwards;
}

.logo-icon.is-drawing .tine-right {
  animation: tine-reveal calc(var(--draw-speed) * 0.7)
             cubic-bezier(0.4, 0, 0.2, 1)
             calc(var(--draw-speed) * 0.35) backwards;
}

.logo-true,
.logo-fork {
  line-height: 1;
}

.logo-true {
  font-size: 1.7rem;
  letter-spacing: 0.10em;
  color: var(--logo-true);
}

.logo-fork {
  font-size: 1.7rem;
  letter-spacing: 0.10em;
  color: var(--logo-fork);
}

/* ---- Nav links ---- */

.nav-links {
  display: flex;
  gap: 2.5rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.nav-links a:hover                    { color: var(--color-text); }
.nav-links a:hover::after             { width: 100%; }
.nav-links a[aria-current="page"]     { color: var(--color-text); }
.nav-links a[aria-current="page"]::after { width: 100%; }

/* ---- Hamburger ---- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(28, 23, 20, 0.97);
    backdrop-filter: blur(18px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0;
  }

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

  .nav-links a {
    display: block;
    padding: 0.875rem 1.5rem;
  }

  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 calc(var(--space-xl) + var(--diag) + 2rem);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 68% 55%, rgba(139, 48, 82, 0.1) 0%, transparent 100%),
    var(--color-bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--diag)), 0 100%);
}

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

.hero h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  letter-spacing: 0.015em;
  line-height: 1.08;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--color-text-muted);
  max-width: 460px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* Large ghosted fork — decorative right-side anchor */
.hero-decoration {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 44vw;
  max-width: 560px;
  color: var(--color-accent);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.hero-decoration svg {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .hero-decoration { opacity: 0.04; width: 70vw; right: -10%; }
}

@media (max-width: 480px) {
  .hero-decoration { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  font-family: var(--font);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  border: 1.5px solid transparent;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 2px 16px rgba(139, 48, 82, 0.35);
}

.btn-primary:hover {
  background: #9e3660;
  border-color: #9e3660;
  box-shadow: 0 6px 28px rgba(139, 48, 82, 0.5);
}

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

.btn-outline:hover {
  background: var(--color-surface-2);
  border-color: rgba(240, 235, 228, 0.28);
}

/* ============================================================
   SECTION LABEL (eyebrow)
   ============================================================ */

.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 1.5rem;
}

/* ============================================================
   WHO I AM
   ============================================================ */

.who-i-am {
  background: var(--color-surface);
  padding: calc(var(--space-xl) + var(--diag)) 1.5rem calc(var(--space-xl) + var(--diag) + 2rem);
  margin-top: calc(-1 * var(--diag));
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--diag)), 0 100%);
}

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

.who-i-am-lead {
  margin-bottom: var(--space-lg);
}

.who-i-am-headline {
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: 0.015em;
  line-height: 1.1;
  color: var(--color-text);
}

.who-i-am-columns {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: var(--space-lg);
}

.who-i-am-photo-wrap {
  aspect-ratio: 3/4;
  border: 1px solid var(--color-border-mod);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
}

.who-i-am-photo-wrap svg { opacity: 0.22; }

.who-i-am-photo-label {
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.7;
  color: var(--color-text-dim);
}

.who-i-am-text-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.who-i-am-text-col p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.85;
}

.who-i-am-pivot {
  font-size: 1.05rem !important;
  color: var(--color-text) !important;
  font-style: italic;
}

.pull-quote {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--color-accent);
  border-left: 2px solid var(--color-accent);
  padding: 0.25rem 0 0.25rem 1.75rem;
  margin: var(--space-md) 0;
  font-style: italic;
  max-width: 820px;
}

.who-i-am-closer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 720px;
}

.who-i-am-closer p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.85;
}

.who-i-am-coda {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--logo-fork);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .who-i-am-columns {
    grid-template-columns: 1fr;
  }
  .who-i-am-photo-wrap {
    aspect-ratio: 4/3;
    max-width: 200px;
  }
}

/* ============================================================
   SERVICES
   ============================================================ */

.services {
  background: var(--color-bg);
  padding: calc(var(--space-xl) + var(--diag)) 1.5rem var(--space-xl);
  margin-top: calc(-1 * var(--diag));
}

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

/* Bento grid — diagonal offset layout */
.services-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card:nth-child(1) { grid-column: span 2; }
.service-card:nth-child(2) { grid-column: span 1; }
.service-card:nth-child(3) { grid-column: span 1; }
.service-card:nth-child(4) { grid-column: span 2; }

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(22px);
  transition: border-color 0.25s, box-shadow 0.25s,
              opacity 0.55s ease, transform 0.55s ease;
}

.service-card:hover {
  border-color: rgba(139, 48, 82, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(139, 48, 82, 0.1);
}

.service-card.is-visible { opacity: 1; transform: translateY(0); }

.service-card:nth-child(1).is-visible { transition-delay: 0ms; }
.service-card:nth-child(2).is-visible { transition-delay: 100ms; }
.service-card:nth-child(3).is-visible { transition-delay: 200ms; }
.service-card:nth-child(4).is-visible { transition-delay: 300ms; }

@media (max-width: 640px) {
  .services-bento { grid-template-columns: 1fr; }
  .service-card:nth-child(n) { grid-column: span 1; }
}

.service-name {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-green);
}

.service-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1;
}

/* Wide cards (1st and 4th) — horizontal split layout */
.service-card:nth-child(1),
.service-card:nth-child(4) {
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 2.25rem 2.5rem;
}

.service-card:nth-child(1) .service-name,
.service-card:nth-child(4) .service-name {
  flex: 0 0 200px;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: none;
  line-height: 1.25;
  padding-right: 2rem;
  padding-top: 0.1rem;
}

.service-card:nth-child(1) .service-desc,
.service-card:nth-child(4) .service-desc {
  flex: 1;
  font-size: 0.95rem;
  border-left: 1px solid var(--color-border);
  padding-left: 2rem;
}

@media (max-width: 640px) {
  .service-card:nth-child(1),
  .service-card:nth-child(4) {
    flex-direction: column;
    padding: 2rem;
    gap: 0.75rem;
  }

  .service-card:nth-child(1) .service-name,
  .service-card:nth-child(4) .service-name {
    flex: unset;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding-right: 0;
    padding-top: 0;
  }

  .service-card:nth-child(1) .service-desc,
  .service-card:nth-child(4) .service-desc {
    border-left: none;
    padding-left: 0;
  }
}

/* ============================================================
   CONTACT / CTA
   ============================================================ */

.contact {
  padding: var(--space-xl) 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

/* Burgundy radial glow behind CTA */
.contact::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse, var(--color-glow) 0%, transparent 70%);
  pointer-events: none;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.contact p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.75;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: #130f0d;
  padding: 2.75rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  height: 38px;
  overflow: hidden;
}

.footer-logo svg {
  width: auto;
  height: 55px;
  color: rgba(240, 235, 228, 0.18);
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0.15em;
}

.footer-logo-text span {
  font-family: var(--font);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(240, 235, 228, 0.28);
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: rgba(240, 235, 228, 0.28);
  transition: color 0.2s;
}

.footer-nav a:hover { color: rgba(240, 235, 228, 0.7); }

.footer-copy {
  font-size: 0.7rem;
  color: rgba(240, 235, 228, 0.16);
  letter-spacing: 0.06em;
}

/* ============================================================
   PORTFOLIO PAGE
   ============================================================ */

.portfolio-hero {
  padding: var(--space-xl) 1.5rem var(--space-md);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.portfolio-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.portfolio-hero p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.portfolio-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem var(--space-xl);
  display: grid;
  gap: 1.25rem;
}

/* ---- App cards ---- */

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.app-card:hover {
  border-color: rgba(91, 138, 158, 0.3);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4);
}

.app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-mod);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  padding: 12px;
  flex-shrink: 0;
}

.app-icon svg {
  filter: brightness(1.7) saturate(1.15);
}

.app-name {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.app-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.1rem;
  max-width: 520px;
}

.app-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-green);
  border: 1px solid rgba(106, 144, 96, 0.22);
}

.app-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.privacy-badge {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  border: 1px solid var(--color-border-mod);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.app-card.coming-soon {
  background: var(--color-bg);
  border-style: dashed;
  border-color: var(--color-border);
}

.app-card.coming-soon .app-name { color: var(--color-text-muted); }

@media (max-width: 540px) {
  .app-card { grid-template-columns: 1fr; }
  .app-card-meta { align-items: flex-start; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .service-card {
    opacity: 1;
    transform: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
}
