/* ============================================
   Agentically Digital — Site Stylesheet
   UK iOS studio for mainstream consumer apps
   Sister studio to Forgeyard Digital
   ============================================ */

/* ============================================
   CSS Variables — Modern, Light, Optimistic
   Distinct from Forgeyard (ember/charcoal)
   ============================================ */
:root {
  /* Core palette — electric violet accent on clean light base */
  --ink: #0F1419;
  --ink-2: #1C2128;
  --paper: #FFFFFF;
  --canvas: #F8F9FB;
  --violet: #6366F1;
  --violet-2: #818CF8;
  --violet-dark: #4F46E5;
  --mint: #10B981;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --line: #E5E7EB;
  --line-2: #F3F4F6;

  /* Semantic */
  --accent: var(--violet);
  --accent-hover: var(--violet-dark);
  --accent-light: #EEF2FF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,.1);
  --shadow-lg: 0 12px 32px rgba(99,102,241,.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ============================================
   Typography
   ============================================ */
.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.sec-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  max-width: 24ch;
}

.sec-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* ============================================
   Layout — Wrap & Sections
   ============================================ */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
}

/* ============================================
   Header & Navigation — Sticky, Glass Effect
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: .92rem;
  font-weight: 600;
}

.nav-links a {
  color: var(--muted);
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--ink);
}

/* Mobile hamburger — CSS-only */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: .3s;
  border-radius: 2px;
}

#nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 24px;
    gap: 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s, opacity .3s;
  }

  #nav-toggle:checked ~ .nav-links {
    max-height: 400px;
    opacity: 1;
  }

  .hamburger {
    display: flex;
  }

  #nav-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  #nav-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--violet-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.btn-link {
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}

.btn-link:hover {
  border-color: var(--accent);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(150deg, var(--canvas) 0%, #fff 100%);
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero .eyebrow {
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  max-width: 18ch;
  margin-bottom: 24px;
  line-height: 1.08;
  background: linear-gradient(135deg, var(--ink), var(--ink-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 40px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero {
    padding: 80px 0 90px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}

/* ============================================
   Grids
   ============================================ */
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

@media (max-width: 768px) {
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all .25s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.card p {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
}

/* ============================================
   App Card (with "Launching" Badge)
   ============================================ */
.appcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  transition: all .3s;
}

.appcard:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.appcard .badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--mint);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.appcard .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.appcard h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.appcard .tagline {
  font-size: .88rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.appcard p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.appcard ul {
  list-style: none;
  margin-bottom: 28px;
}

.appcard ul li {
  color: var(--muted);
  font-size: .95rem;
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.appcard ul li::before {
  content: '✓';
  color: var(--mint);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================
   Stats
   ============================================ */
.stat {
  text-align: center;
}

.stat .num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat .label {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================
   Quote / Testimonial
   ============================================ */
.quote {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 40px 0;
}

.quote p {
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.quote cite {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  font-weight: 600;
  font-style: normal;
}

/* ============================================
   FAQ — <details> Component
   ============================================ */
.faq {
  margin-top: 48px;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all .2s;
}

.faq details:hover {
  border-color: var(--accent);
}

.faq details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform .2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--canvas);
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  font-size: .9rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand {
  max-width: 32ch;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--muted);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom .sister-studio {
  font-size: .88rem;
  color: var(--muted-2);
}

.footer-bottom .sister-studio a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.footer-bottom .sister-studio a:hover {
  border-color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--muted);
  font-size: 1.2rem;
  transition: color .2s;
}

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

/* ============================================
   Accessibility
   ============================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  z-index: 200;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
  text-align: center;
}
/* Width-capped blocks (.sec-title/.sec-subtitle have max-width) only centre their
   text via text-align; the box itself needs auto side-margins to sit centred on
   wide viewports (Safari desktop showed these pinned left). */
.text-center .sec-title,
.text-center .sec-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.mt-48 {
  margin-top: 48px;
}

.mb-48 {
  margin-bottom: 48px;
}

.bg-canvas {
  background: var(--canvas);
}

.bg-gradient {
  background: linear-gradient(135deg, var(--accent-light), #fff);
}

.accent-text {
  color: var(--accent);
}

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