﻿/* ============================================================
   TEAM ALUM - STYLE SHEET
   Neomorphism + Claymorphism Hybrid
   ============================================================ */

/* ==================== :root VARIABLES ==================== */
:root {
  --bg-base: #EDEAF6;
  --bg-secondary: #E4F3EA;
  --accent-lavender: #B9AEE8;
  --accent-mint: #9FE3C0;
  --accent-peach: #F7C9A6;
  --text-primary: #2E2A3D;
  --text-secondary: #6E6784;
  --shadow-dark: rgba(163, 155, 210, 0.45);
  --shadow-light: rgba(255, 255, 255, 0.9);
  --success: #6FCF97;
  --font-heading: 'Fraunces', 'Poppins', sans-serif;
  --font-ui: 'Poppins', sans-serif;
  --font-body: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --neo-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  --neo-inset: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  --clay-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light), 0 0 0 1px rgba(255,255,255,0.15);
  --clay-glow: 0 0 20px rgba(185, 174, 232, 0.25), 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;
  --radius-card: 32px;
  --ease-page: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-page: 0.5s;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body { opacity: 0; animation: siteFadeIn 0.8s ease-out 0.1s forwards; }

@keyframes siteFadeIn { to { opacity: 1; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-primary); line-height: 1.3; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Prevent any text overflow globally */
h1, h2, h3, h4, p, span, button, a {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ==================== NAVIGATION ==================== */
.navbar {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 20px; background: var(--bg-base);
  border-radius: var(--radius-pill); box-shadow: var(--clay-shadow);
  max-width: calc(100vw - 32px);
}

.logo { flex-shrink: 0; padding-right: 8px; min-width: 0; }

.logo-text {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--text-primary); letter-spacing: -0.01em; white-space: nowrap;
}

.nav-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav-pills::-webkit-scrollbar { display: none; }

.nav-pill {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 10px 18px;
  border-radius: var(--radius-pill); background: var(--bg-base);
  color: var(--text-secondary);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  transition: all 0.25s ease; white-space: nowrap; user-select: none; position: relative;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}

.nav-pill:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  color: var(--text-primary);
}

.nav-pill:active { transform: translateY(0); box-shadow: var(--neo-inset); }

.nav-pill.nav-link-pill {
  background: var(--accent-mint);
  color: var(--text-primary);
}

.nav-pill.nav-link-pill:hover { color: var(--text-primary); background: #8fd9b4; }

.nav-pill.active { box-shadow: var(--neo-inset); background: var(--accent-lavender); color: #fff; }

.nav-pill:focus-visible { outline: 2px solid var(--accent-lavender); outline-offset: 2px; }

/* ==================== PAGE CONTAINER & TRANSITIONS ==================== */
.page-container { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

.page {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; will-change: transform, opacity; transform: translateX(0);
}

.page.active { opacity: 1; pointer-events: auto; z-index: 1; }
.page.transitioning-out { pointer-events: none; z-index: 0; }

.page-inner {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 100px 24px 40px;
}

.page.slide-out-left { animation: slideOutLeft var(--duration-page) var(--ease-page) forwards; }
.page.slide-out-right { animation: slideOutRight var(--duration-page) var(--ease-page) forwards; }
.page.slide-in-right { animation: slideInRight var(--duration-page) var(--ease-page) forwards; }
.page.slide-in-left { animation: slideInLeft var(--duration-page) var(--ease-page) forwards; }

@keyframes slideOutLeft { to { opacity: 0; transform: translateX(-60px); } }
@keyframes slideOutRight { to { opacity: 0; transform: translateX(60px); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }

/* ==================== NEOMORPHIC BASE STYLES ==================== */
.neo-recess { box-shadow: var(--neo-inset); border-radius: var(--radius-md); background: var(--bg-base); }
.neo-raised { box-shadow: var(--neo-shadow); border-radius: var(--radius-md); background: var(--bg-base); }

/* ==================== CLAYMORPHIC COMPONENT STYLES ==================== */
.clay-card {
  background: var(--bg-base); border-radius: var(--radius-card);
  box-shadow: var(--clay-shadow); padding: 32px;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}

.clay-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0; pointer-events: none;
}

.clay-card:hover { transform: scale(1.02) translateY(-4px); box-shadow: var(--clay-glow); }

.clay-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; border-radius: var(--radius-pill); background: var(--bg-base);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.03em; transition: all 0.25s ease; cursor: pointer;
}

.clay-pill:hover { transform: translateY(-2px); box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light); }
.clay-pill:active { box-shadow: var(--neo-inset); transform: translateY(0); }

/* Buttons */
.btn-clay {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.04em; padding: 14px 36px; border-radius: var(--radius-pill);
  background: var(--accent-lavender); color: #fff;
  box-shadow: 6px 6px 16px var(--shadow-dark), -4px -4px 12px var(--shadow-light), inset 0 2px 0 rgba(255,255,255,0.25);
  transition: all 0.25s ease; border: none; cursor: pointer;
}

.btn-clay:hover { transform: scale(1.03) translateY(-2px); box-shadow: 8px 8px 22px var(--shadow-dark), -6px -6px 16px var(--shadow-light), inset 0 2px 0 rgba(255,255,255,0.3); }
.btn-clay:active { transform: scale(0.98); box-shadow: var(--neo-inset); }
.btn-clay:focus-visible { outline: 2px solid var(--accent-lavender); outline-offset: 3px; }

.btn-clay-sm {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 8px 20px;
  border-radius: var(--radius-pill); background: var(--accent-mint);
  color: var(--text-primary);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  transition: all 0.25s ease; border: none; cursor: pointer; display: inline-block;
}

.btn-clay-sm:hover { transform: scale(1.04) translateY(-2px); box-shadow: 6px 6px 14px var(--shadow-dark), -5px -5px 12px var(--shadow-light); }
.btn-clay-sm:active { box-shadow: var(--neo-inset); transform: scale(0.97); }

/* Input wells */
.input-well {
  width: 100%; border-radius: var(--radius-md); box-shadow: var(--neo-inset);
  background: var(--bg-base); padding: 4px; margin-bottom: 16px; transition: box-shadow 0.3s ease;
}

.input-well input, .input-well textarea {
  width: 100%; padding: 14px 18px; border: none; background: transparent;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text-primary);
  outline: none; resize: vertical;
}

.input-well input::placeholder, .input-well textarea::placeholder { color: var(--text-secondary); opacity: 0.7; }
.input-well:focus-within { box-shadow: var(--neo-inset), 0 0 0 2px var(--accent-lavender); }
.input-well.error { box-shadow: var(--neo-inset), 0 0 0 2px #e57373; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }

/* ==================== PAGE-SPECIFIC STYLES ==================== */

/* ---- HOME ---- */
.home-inner { position: relative; text-align: center; overflow: hidden; }

.home-future-note {
  font-size: 0.85rem; color: var(--text-secondary); opacity: 0.7;
  margin-top: -24px; margin-bottom: 32px; max-width: 460px;
  font-style: italic;
  position: relative; z-index: 1;
}

.home-blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.45; }
.blob-1 { width: 450px; height: 450px; background: var(--accent-lavender); top: -10%; right: -5%; }
.blob-2 { width: 350px; height: 350px; background: var(--accent-mint); bottom: -8%; left: -3%; }
.blob-3 { width: 280px; height: 280px; background: var(--accent-peach); top: 40%; left: 55%; }

.home-content { position: relative; z-index: 1; }

.home-title {
  font-size: clamp(3rem, 8vw, 7rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-lavender) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.home-tagline {
  font-family: var(--font-body); font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary); margin-bottom: 40px; max-width: 500px;
}

.cta-btn { font-size: 1rem; padding: 16px 44px; }

/* ---- ABOUT / FOUNDERS ---- */
.about-inner { gap: 24px; }

.section-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 700;
  text-align: center; margin-bottom: 8px;
}

.founders-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 960px; width: 100%;
}

.founder-card {
  text-align: center; display: flex; flex-direction: column; align-items: center;
  padding: 36px 24px 28px; min-width: 0; overflow: hidden;
}

.founder-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-lavender), var(--accent-mint));
  box-shadow: 4px 4px 12px var(--shadow-dark), -4px -4px 12px var(--shadow-light),
              inset 0 2px 4px rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; position: relative; z-index: 1; flex-shrink: 0;
}

.avatar-initials {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.founder-name {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1;
  width: 100%; line-height: 1.3;
}

.founder-role {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-lavender); margin-bottom: 12px; position: relative; z-index: 1;
}

.founder-bio {
  font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary);
  position: relative; z-index: 1; width: 100%;
}

.founder-tags {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-bottom: 12px; position: relative; z-index: 1; width: 100%;
}

.founder-tag {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.65rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--bg-base);
  box-shadow: 2px 2px 6px var(--shadow-dark), -2px -2px 6px var(--shadow-light);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Stagger-in animation for About page */
.stagger-in { opacity: 0; transition: opacity 0.5s ease; }
.stagger-in.visible { opacity: 1; }

/* ---- SERVICES ---- */
.services-inner { gap: 24px; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1000px; width: 100%;
}

.service-card {
  text-align: center; padding: 32px 20px; display: flex;
  flex-direction: column; align-items: center; min-width: 0; overflow: hidden;
}

.service-icon-wrap {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-lavender), var(--accent-mint));
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; position: relative; z-index: 1; font-size: 1.5rem;
  flex-shrink: 0;
}

.service-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1;
  line-height: 1.3; width: 100%;
}

.service-desc {
  font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary); position: relative; z-index: 1;
  width: 100%;
}

/* ---- PROJECTS ---- */
.projects-inner { gap: 24px; }

.projects-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 900px; width: 100%;
}

.project-card { padding: 28px; min-width: 0; overflow: hidden; }

.project-content { position: relative; z-index: 1; width: 100%; min-width: 0; }

.project-title {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; width: 100%; line-height: 1.3;
}

.project-desc {
  font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary);
  margin-bottom: 16px; width: 100%;
}

.project-link { opacity: 0; transition: opacity 0.3s ease; }
.project-card:hover .project-link { opacity: 1; }

.project-title-btn {
  font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary); background: none; border: none; cursor: pointer;
  padding: 0; text-align: left; line-height: 1.3; width: 100%;
  transition: color 0.2s ease;
  overflow-wrap: break-word; word-wrap: break-word;
}

.project-title-btn:hover { color: var(--accent-lavender); }
.project-title-btn:focus-visible { outline: 2px solid var(--accent-lavender); outline-offset: 2px; border-radius: 4px; }

.project-status-pill {
  display: inline-block;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--radius-pill);
  background: var(--accent-peach); color: var(--text-primary);
  opacity: 0.85;
}

/* ---- ASK US ---- */
.ask-inner { gap: 0; }

.ask-card {
  max-width: 520px; width: 100%; text-align: center; padding: 40px 36px;
}

.ask-subtext {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 28px; max-width: 420px; margin-left: auto; margin-right: auto;
}

.ask-form { width: 100%; }

.submit-btn { width: 100%; margin-top: 4px; }

/* Success state */
.ask-success, .contact-success { text-align: center; padding: 20px 0; }
.hidden { display: none !important; }

.success-check {
  width: 72px; height: 72px; margin: 0 auto 20px;
}

.check-svg { width: 100%; height: 100%; }

.check-path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.5s ease 0.2s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.ask-success .success-check, .contact-success .success-check {
  animation: popIn 0.4s var(--ease-bounce) forwards;
  transform: scale(0);
  opacity: 0;
}

@keyframes popIn {
  to { transform: scale(1); opacity: 1; }
}

.success-text {
  font-family: var(--font-ui); font-size: 1.1rem; font-weight: 600;
  color: var(--success); margin-bottom: 20px;
}

.ask-another-btn, .retry-btn { margin-top: 8px; }

/* ---- CONTACT ---- */
.contact-inner { gap: 24px; flex-wrap: wrap; }

.contact-card {
  max-width: 520px; width: 100%; text-align: center; padding: 40px 36px;
}

.contact-form { width: 100%; }

.social-links { display: flex; gap: 12px; justify-content: center; }

.social-pill { font-size: 0.8rem; padding: 10px 22px; }

.social-soon { opacity: 0.5; cursor: default; pointer-events: none; }

/* ---- FOOTER ---- */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  text-align: center; padding: 10px 16px;
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 500;
  color: var(--text-secondary); opacity: 0.5;
  letter-spacing: 0.03em; z-index: 500;
  pointer-events: none;
}

/* ---- PROJECT DETAIL MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(46, 42, 61, 0.4); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-card {
  max-width: 520px; width: 100%; padding: 40px 36px;
  position: relative; text-align: left;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute; top: 16px; right: 20px;
  font-size: 1.6rem; color: var(--text-secondary);
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; z-index: 2;
}

.modal-close:hover { background: var(--bg-base); box-shadow: var(--neo-inset); color: var(--text-primary); }

.modal-status {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--accent-mint); color: var(--text-primary);
  position: relative; z-index: 1;
}

.modal-title {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 12px;
  padding-right: 32px; position: relative; z-index: 1;
}

.modal-desc {
  font-size: 0.92rem; line-height: 1.7; color: var(--text-secondary);
  margin-bottom: 24px; position: relative; z-index: 1;
}

.modal-actions { position: relative; z-index: 1; }

.modal-open-btn { display: inline-block; }

.modal-coming-soon {
  font-family: var(--font-ui); font-weight: 600; font-size: 0.85rem;
  color: var(--text-secondary); letter-spacing: 0.03em;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  /* Pages scroll naturally */
  .page {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .page-inner {
    min-height: 100%;
    height: auto;
    align-items: center;
    justify-content: flex-start;
    padding-top: 118px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  /* Navbar: logo row on top, full-width scrollable pills below */
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    padding: 10px 12px;
  }
  .logo { display: flex; justify-content: center; padding-right: 0; }
  .logo-text { font-size: 1rem; }
  .nav-pills { width: 100%; gap: 6px; padding: 2px; }
  .nav-pill { flex-shrink: 0; font-size: 0.75rem; padding: 10px 16px; }

  /* Home */
  .home-title { font-size: clamp(2.5rem, 12vw, 3.6rem); margin-bottom: 14px; }
  .home-tagline { font-size: clamp(1rem, 3vw, 1.15rem); margin-bottom: 24px; }
  .home-future-note { margin-top: 0; font-size: 0.85rem; margin-bottom: 24px; }
  .cta-btn { font-size: 0.95rem; padding: 14px 36px; }

  /* Blobs */
  .blob-1 { width: 280px; height: 280px; }
  .blob-2 { width: 220px; height: 220px; }
  .blob-3 { width: 170px; height: 170px; }

  /* Cards */
  .clay-card { padding: 26px 22px; border-radius: var(--radius-lg); }
  .clay-card:hover { transform: none; }

  /* Section headings */
  .section-heading { font-size: clamp(1.6rem, 5.5vw, 2.1rem); margin-bottom: 16px; line-height: 1.25; }

  /* Founders */
  .founders-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 640px; }
  .founder-card { padding: 28px 18px 24px; }
  .founder-avatar { width: 76px; height: 76px; }
  .avatar-initials { font-size: 1.3rem; }
  .founder-name { font-size: 1.02rem; }
  .founder-bio { font-size: 0.88rem; line-height: 1.6; }
  .founder-tag { font-size: 0.65rem; padding: 4px 9px; }

  /* Services */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 640px; }
  .service-card { padding: 26px 16px; }
  .service-icon-wrap { width: 54px; height: 54px; font-size: 1.35rem; margin-bottom: 12px; }
  .service-title { font-size: 1rem; }
  .service-desc { font-size: 0.87rem; line-height: 1.55; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; max-width: 480px; gap: 16px; }
  .project-card { padding: 26px; }
  .project-title, .project-title-btn { font-size: 1.08rem; }
  .project-desc { font-size: 0.9rem; }
  .project-link { opacity: 1; }

  /* Ask Us / Contact */
  .ask-card, .contact-card { padding: 34px 24px; max-width: 480px; }
  .input-well input, .input-well textarea { font-size: 16px; }

  /* Modal */
  .modal-overlay { padding: 16px; }
  .modal-card {
    max-height: 84vh;
    max-height: 84dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 32px 24px;
  }

  /* Footer */
  .site-footer { font-size: 0.68rem; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .page-inner {
    padding: 80px 14px 50px;
  }

  /* Navbar - compact */
  .navbar {
    top: 8px; gap: 5px; padding: 5px 6px 5px 10px;
    max-width: calc(100vw - 16px);
  }
  .logo-text { font-size: 0.88rem; padding-right: 4px; }
  .nav-pill { font-size: 0.62rem; padding: 6px 10px; letter-spacing: 0.03em; }
  .nav-pills { gap: 3px; }

  /* Home */
  .home-title { font-size: clamp(2rem, 11vw, 3rem); margin-bottom: 10px; }
  .home-tagline { font-size: 0.85rem; margin-bottom: 22px; line-height: 1.5; }
  .home-future-note { font-size: 0.75rem; line-height: 1.55; }
  .cta-btn { font-size: 0.82rem; padding: 12px 28px; }

  /* Blobs - even smaller */
  .blob-1 { width: 180px; height: 180px; }
  .blob-2 { width: 140px; height: 140px; }
  .blob-3 { width: 110px; height: 110px; }

  /* Cards */
  .clay-card { padding: 20px 16px; border-radius: var(--radius-md); }

  /* Section headings */
  .section-heading { font-size: clamp(1.2rem, 5vw, 1.6rem); margin-bottom: 12px; line-height: 1.2; }

  /* Founders - single column */
  .founders-grid { grid-template-columns: 1fr; max-width: 320px; }
  .founder-card { padding: 22px 16px 18px; }
  .founder-avatar { width: 64px; height: 64px; }
  .avatar-initials { font-size: 1.1rem; }
  .founder-name { font-size: 0.92rem; line-height: 1.2; }
  .founder-role { font-size: 0.65rem; }
  .founder-bio { font-size: 0.78rem; line-height: 1.5; }
  .founder-tags { gap: 4px; }
  .founder-tag { font-size: 0.55rem; padding: 3px 7px; }

  /* Services - single column */
  .services-grid { grid-template-columns: 1fr; max-width: 320px; }
  .service-card { padding: 20px 14px; }
  .service-icon-wrap { width: 44px; height: 44px; border-radius: 14px; font-size: 1.15rem; margin-bottom: 10px; }
  .service-title { font-size: 0.88rem; line-height: 1.2; }
  .service-desc { font-size: 0.78rem; line-height: 1.45; }

  /* Projects */
  .projects-grid { max-width: 340px; gap: 14px; }
  .project-card { padding: 20px 16px; }
  .project-title { font-size: 0.95rem; }
  .project-title-btn { font-size: 0.95rem; line-height: 1.25; }
  .project-desc { font-size: 0.8rem; margin-bottom: 12px; line-height: 1.45; }

  /* Ask Us */
  .ask-card { padding: 24px 16px; }
  .ask-subtext { font-size: 0.82rem; margin-bottom: 20px; }
  .ask-card h2 { font-size: 1.3rem; }
  .input-well { margin-bottom: 12px; }
  .input-well input, .input-well textarea { font-size: 0.85rem; padding: 11px 12px; }
  .btn-clay { font-size: 0.85rem; padding: 12px 28px; }

  /* Contact */
  .contact-card { padding: 24px 16px; }
  .contact-card h2 { font-size: 1.3rem; }
  .social-pill { font-size: 0.7rem; padding: 8px 14px; }

  /* Modal */
  .modal-overlay { padding: 12px; }
  .modal-card { padding: 24px 18px; }
  .modal-title { font-size: 1.1rem; }
  .modal-desc { font-size: 0.82rem; line-height: 1.6; }
  .modal-close { top: 10px; right: 14px; width: 32px; height: 32px; font-size: 1.3rem; }

  /* Footer */
  .site-footer { font-size: 0.6rem; padding: 6px 10px; }
}

/* Small mobile (360px and below) */
@media (max-width: 360px) {
  .page-inner { padding: 75px 10px 45px; }

  .navbar { top: 6px; padding: 4px 5px 4px 8px; gap: 3px; }
  .logo-text { font-size: 0.78rem; }
  .nav-pill { font-size: 0.56rem; padding: 5px 8px; letter-spacing: 0.02em; }

  .home-title { font-size: 1.8rem; }
  .home-tagline { font-size: 0.78rem; }
  .cta-btn { font-size: 0.78rem; padding: 10px 24px; }

  .founders-grid { max-width: 280px; gap: 12px; }
  .founder-card { padding: 18px 12px 14px; }
  .founder-avatar { width: 56px; height: 56px; }
  .avatar-initials { font-size: 1rem; }
  .founder-name { font-size: 0.85rem; }
  .founder-bio { font-size: 0.72rem; }
  .founder-tag { font-size: 0.5rem; padding: 2px 6px; }

  .services-grid { max-width: 280px; }
  .service-card { padding: 16px 12px; }
  .service-title { font-size: 0.82rem; }
  .service-desc { font-size: 0.72rem; }

  .projects-grid { max-width: 300px; gap: 10px; }
  .project-card { padding: 16px 12px; }
  .project-title { font-size: 0.88rem; }
  .project-title-btn { font-size: 0.88rem; }
  .project-desc { font-size: 0.75rem; }

  .ask-card, .contact-card { padding: 20px 12px; }
  .section-heading { font-size: 1.1rem; }
}

/* ==================== MOBILE FIXES (PHONES ONLY) ====================
   All rules below are scoped to max-width: 768px or narrower.
   Widths above 768px are completely unaffected. */

@media (max-width: 768px) {
  /* Real rendered height of the stacked mobile navbar
     (logo row + pill row + padding), used by .page-inner below.
     Measured nav bottom edge at these widths is ~116px. */
  :root { --navbar-height: 110px; }

  /* Dynamic viewport height: prevents overlap/cut-off when the mobile
     browser address bar shows/hides */
  .page {
    height: 100vh;
    height: 100dvh;
  }

  /* Push page content below the floating pill nav */
  .page-inner {
    padding-top: calc(var(--navbar-height, 70px) + 16px);
  }

  /* Nav pills: one horizontally scrollable row instead of wrapping */
  .nav-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-pills::-webkit-scrollbar { display: none; }
  .nav-pill {
    padding: 8px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* iOS notch / home-indicator safe areas */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Minimum touch target size */
  .nav-pill { min-height: 44px; }
  .btn-clay-sm {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root { --navbar-height: 84px; } /* compact navbar variant (bottom edge ~89px) */
}

@media (max-width: 600px) {
  /* Grids collapse to a single column */
  .founders-grid,
  .services-grid,
  .projects-grid { grid-template-columns: 1fr; }

  /* Typography scaling for small screens */
  .home-title { font-size: clamp(2rem, 10vw, 2.75rem); }
  .section-heading { font-size: clamp(1.5rem, 7vw, 2rem); }
  .founder-name,
  .project-title { font-size: 1.1rem; }

  /* Card padding / spacing */
  .clay-card { padding: 16px; }
  .founders-grid,
  .services-grid,
  .projects-grid { gap: 12px; }

  /* Form fields always fit inside their card */
  .input-well input,
  .input-well textarea {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1; }
  .page { opacity: 1; transform: none; }
  .page.active { opacity: 1; pointer-events: auto; }
}
