/* ============================================
   NORTH THIRD PROJECTS — styles.css
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
  --coral:    #E07B6A;
  --blue:     #7FB1C3;
  --peach:    #F1AC8C;
  --charcoal: #1D2838;
  --logo-text: #474B6A;

  --bg:       #FAFAF7;
  --bg-warm:  #F3EBE0;
  --bg-card:  #FFFFFF;

  --text:     #1D2838;
  --text-mid: #4A5568;
  --text-lt:  #8A9BAD;
  --border:   rgba(29, 40, 56, 0.09);

  --shadow-sm: 0 1px 8px rgba(29, 40, 56, 0.06);
  --shadow:    0 4px 24px rgba(29, 40, 56, 0.09);
  --shadow-md: 0 8px 40px rgba(29, 40, 56, 0.13);

  --radius:    16px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --container: 1120px;
  --nav-h:     72px;
  --ease:      cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.2;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.35rem, 5.25vw, 3.83rem); font-weight: 600; }
h2 { font-size: clamp(1.78rem, 3.3vw, 2.73rem);  font-weight: 600; }
h3 { font-size: 1.1rem;  font-weight: 600; }

p  { color: var(--text-mid); line-height: 1.75; }
em { font-style: italic; color: var(--coral); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* ---------- Shared section spacing ---------- */
section { padding-block: clamp(72px, 10vw, 128px); }

.section-label {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.section-header {
  margin-bottom: 56px;
}
.section-header h2 { margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: background 0.22s var(--ease), transform 0.18s var(--ease),
              box-shadow 0.18s var(--ease), border-color 0.22s var(--ease);
}

.btn-primary {
  background: var(--charcoal);
  color: #fff;
  box-shadow: 0 2px 12px rgba(29, 40, 56, 0.22);
}
.btn-primary:hover {
  background: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 114, 90, 0.32);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid rgba(29, 40, 56, 0.22);
}
.btn-ghost:hover {
  border-color: var(--charcoal);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* ---------- Navigation ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.site-header.scrolled {
  background: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  flex-shrink: 0;
}

.logo-img {
  display: block;
  height: 63px;
  width: auto;
}

.logo-img-footer {
  height: 30px;
  filter: brightness(0) invert(1);
  opacity: 0.65;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-mid);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--charcoal); }

.nav-cta {
  padding: 9px 22px !important;
  border-radius: 100px !important;
  background: var(--charcoal) !important;
  color: #fff !important;
  font-size: 0.88rem !important;
  transition: background 0.22s var(--ease) !important;
}
.nav-cta:hover { background: var(--coral) !important; color: #fff !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-xs);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.22s var(--ease);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block-start: var(--nav-h);
  padding-block-end: clamp(64px, 10vw, 120px);
  overflow: hidden;
}

/* Soft ambient shapes — the three logo shapes, large & blurred */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  opacity: 0.28;
  filter: blur(62px);
  will-change: transform;
}

.shape-coral {
  width: clamp(320px, 45vw, 560px);
  height: clamp(240px, 34vw, 420px);
  background: var(--coral);
  border-radius: 40% 60% 65% 35% / 40% 35% 65% 60%;
  top: -10%;
  right: -8%;
}

.shape-blue {
  width: clamp(200px, 28vw, 360px);
  height: clamp(200px, 28vw, 360px);
  background: var(--blue);
  border-radius: 50%;
  bottom: 0;
  left: -5%;
}

.shape-peach {
  width: clamp(160px, 22vw, 280px);
  height: clamp(160px, 22vw, 280px);
  background: var(--peach);
  border-radius: 28px;
  bottom: 10%;
  right: 22%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
}

/* Crisp brand-shape composition — exact logo geometry, fills the right side */
.hero-art {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(72px, 10vw, 190px);
  width: clamp(130px, 15vw, 200px);
  aspect-ratio: 305 / 331;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-art svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: transform;
  animation: art-float 7s var(--ease) infinite;
}
@keyframes art-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-1.2deg); }
}

/* Coral accent on the headline's closing period */
.hero-period { color: var(--coral); }

@media (prefers-reduced-motion: reduce) {
  .hero-art svg { animation: none; }
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 20px;
}

.hero h1 { margin-bottom: 24px; font-family: 'Courier New', Courier, monospace; }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 500px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- About ---------- */
.section-about { background: var(--bg-warm); }

.about-grid {
  max-width: 680px;
}

.about-text h2    { margin-top: 8px; margin-bottom: 20px; }
.about-text p     { margin-bottom: 16px; }
.about-text p:last-child { margin-bottom: 0; }

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 42px;
}

.pillar {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* The three shapes from the logo, used as pillar icons */
.pillar-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-top: 3px;
}
.coral-shape { background: var(--coral); border-radius: 10px; }
.blue-shape  { background: var(--blue);  border-radius: 50%;  }
.peach-shape { background: var(--peach); border-radius: 7px;  }

.pillar h3   { margin-bottom: 6px; font-size: 1.0rem; }
.pillar p    { font-size: 0.9rem; }

/* ---------- Portfolio ---------- */
.section-portfolio { background: var(--bg); }

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
  margin-bottom: 60px;
}

.company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 22px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              border-color 0.22s var(--ease);
}
.company-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* Logo container shared by active + exit cards */
.logo-wrap {
  width: 64px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.logo-wrap img {
  max-width: 64px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Shown when logo fails to load */
.logo-fallback {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-warm);
  color: var(--charcoal);
  font-weight: 700;
  font-size: 0.95rem;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.company-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--charcoal);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.3;
  margin-bottom: 8px;
}

.company-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-lt);
  background: var(--bg-warm);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ---------- Exits ---------- */
.exits-wrap {
  border-top: 1px solid var(--border);
  padding-top: 52px;
}

.exits-heading {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-lt);
  margin-bottom: 24px;
}

.exits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 12px;
}

.exit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 20px;
  background: var(--bg-warm);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  opacity: 0.72;
}
.exit-card:hover { opacity: 1; transform: translateY(-2px); }

.exit-card .logo-wrap img {
  filter: grayscale(35%);
  opacity: 0.75;
}

.exit-acq {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-mid);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 2px;
}
.exit-detail {
  font-size: 0.68rem;
  color: var(--text-lt);
  font-family: 'DM Sans', sans-serif;
}

/* ---------- Team ---------- */
.section-team { background: var(--bg-warm); }

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.team-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 2px solid var(--border);
  margin-bottom: 22px;
}

.team-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

.team-avatar--photo {
  object-fit: cover;
  object-position: center top;
}

.team-card h3   { margin-bottom: 4px; font-size: 1.15rem; }

.team-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--coral);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 16px;
}

.team-bio {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 22px;
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-mid);
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s var(--ease);
}
.team-linkedin:hover { color: var(--charcoal); }

/* ---------- Contact ---------- */
.section-contact { background: var(--bg); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: start;
}

.contact-text h2 { margin-top: 8px; margin-bottom: 16px; }
.contact-text p  { margin-bottom: 32px; max-width: 380px; }

.contact-email {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  border-bottom: 2px solid var(--coral);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease);
  font-family: 'DM Sans', sans-serif;
}
.contact-email:hover { color: var(--coral); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Netlify Forms honeypot — visually removed, kept for bots */
.hidden-field { display: none; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

.optional {
  font-weight: 400;
  color: var(--text-lt);
}

.form-group input,
.form-group textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(111, 163, 184, 0.16);
}

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

.form-note {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.25em;
  font-family: 'DM Sans', sans-serif;
}
.form-note.success { color: #27ae60; }
.form-note.error   { color: #e63946; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  padding-block-start: 0;
  padding-block-end: 36px;
}

.footer-skyline {
  width: 100%;
  overflow: hidden;
  padding-block-start: 32px;
  line-height: 0;
}
.footer-skyline svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(100px, 16vw, 200px);
  opacity: 0.9;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block-start: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  display: inline-block;
  line-height: 0;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  font-family: 'DM Sans', sans-serif;
}

.footer-nav {
  display: flex;
  gap: 24px;
}
.footer-nav a {
  font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.48);
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: #fff; }

/* ---------- Animations ---------- */

/* 1. Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--coral);
  z-index: 200;
  pointer-events: none;
}

/* 2. Hero typewriter cursor */
.hero-cursor {
  display: inline-block;
  color: var(--coral);
  font-weight: 300;
  animation: blink-cursor 0.75s step-end infinite;
  margin-left: 1px;
  transition: opacity 1s ease;
}
.hero-cursor--done {
  opacity: 0;
  animation: none;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* 4. Portfolio card 3-D tilt: relative positioning + snappier transform transition */
.company-card {
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.22s var(--ease),
              border-color 0.22s var(--ease);
}

/* 5. Active portfolio pulse dot */
.pulse-dot {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #4ade80;
  animation: pulse-ring 2.2s ease-out infinite;
  opacity: 0;
}
@keyframes pulse-ring {
  0%   { transform: scale(0.5); opacity: 0.85; }
  100% { transform: scale(2.5); opacity: 0;    }
}

/* 7. Hero parallax — GPU compositing hint */
.hero-eyebrow,
.hero h1,
.hero-sub,
.hero-actions {
  will-change: transform;
}


/* 10. Idle toast */
.idle-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--charcoal);
  color: rgba(255,255,255,0.82);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  padding: 12px 22px;
  border-radius: 100px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
.idle-toast a {
  color: var(--peach);
  font-weight: 600;
  pointer-events: auto;
}
.idle-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-art      { display: none; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-text p { max-width: 100%; }
}

@media (max-width: 768px) {
  .hero {
    align-items: flex-start;
    min-height: 775px;
    padding-block-start: calc(var(--nav-h) + 28px);
    padding-block-end: 40px;
  }

  .section-about { padding-block-start: 48px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(250, 250, 247, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
  }
  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 13px 28px;
    font-size: 1rem;
    color: var(--charcoal);
  }
  /* Override nav-cta for mobile */
  .nav-links li:last-child {
    padding: 10px 20px 0;
  }
  .nav-cta {
    display: block;
    text-align: center;
    border-radius: 100px !important;
    padding: 13px 22px !important;
  }

  .company-grid { grid-template-columns: repeat(3, 1fr); }
  .exits-grid   { grid-template-columns: repeat(3, 1fr); }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-brand { flex-direction: row; align-items: center; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .company-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .exits-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .team-card { padding: 28px 24px; }
}
