/* ============================================
   KEYNOTED.COM — Neon Notebook Design System
   Brand: Education Communications Creative Studio
   Fonts: DM Sans (primary), Montserrat (secondary)
   Palette: Coral, Teal, Sky, Marigold, Rosé
   ============================================ */

/* ---- CSS VARIABLES ---- */
:root {
  --coral: #FF6B4A;
  --teal: #00C9A7;
  --sky: #5B8DEF;
  --marigold: #FFD166;
  --rose: #EF6FA0;
  --black: #1A1A1A;
  --white: #FFFFFF;
  --cream: #FFF8F0;
  --gray-100: #F5F3F0;
  --gray-200: #E8E5E0;
  --gray-300: #D1CCC6;
  --gray-400: #A8A29E;
  --gray-600: #6B6560;
  --gradient: linear-gradient(135deg, #FF6B4A 0%, #EF6FA0 22%, #FFD166 44%, #00C9A7 68%, #5B8DEF 100%);
  --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1200px;
  --max-w-narrow: 800px;
  --gutter: 24px;
  --nav-height: 72px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 100px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
  --shadow-xl: 0 32px 80px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-secondary);
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 16px;
}

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

/* ---- UTILITIES ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.5vw, 28px); }
h4 { font-size: 20px; }

.section-label {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 32px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--gray-600);
  max-width: 600px;
  line-height: 1.7;
}
.section-subtitle.centered {
  margin-left: auto;
  margin-right: auto;
}

/* ---- STITCH PATTERNS ---- */
.stitch-line {
  height: 3px;
  background: repeating-linear-gradient(to right,
    var(--coral) 0 8px, transparent 8px 14px,
    var(--teal) 14px 22px, transparent 22px 28px,
    var(--sky) 28px 36px, transparent 36px 42px,
    var(--marigold) 42px 50px, transparent 50px 56px,
    var(--rose) 56px 64px, transparent 64px 70px
  );
  border-radius: 2px;
}

.stitch-border {
  border: 2px dashed var(--gray-200);
}

.corner-brackets {
  position: relative;
}
.corner-brackets::before,
.corner-brackets::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--coral);
  border-style: solid;
}
.corner-brackets::before {
  top: -4px; left: -4px;
  border-width: 3px 0 0 3px;
}
.corner-brackets::after {
  bottom: -4px; right: -4px;
  border-width: 0 3px 3px 0;
}

.gradient-bar {
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.dot-grid {
  background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 74, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--gray-200);
}
.btn-secondary:hover {
  border-color: var(--black);
  transform: translateY(-2px);
}

.btn-coral {
  background: var(--coral);
  color: var(--white);
}
.btn-coral:hover {
  background: #e85a3a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 74, 0.3);
}

.btn-white {
  background: var(--white);
  color: var(--black);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 0.2s;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-lg {
  padding: 18px 40px;
  font-size: 16px;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 13px;
}

/* ---- NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: all var(--transition);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--black);
  background: var(--gray-100);
}
.nav-links a.active {
  color: var(--black);
  font-weight: 600;
}

.nav-cta {
  background: var(--black) !important;
  color: var(--white) !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
}
.nav-cta:hover {
  background: var(--coral) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  margin: 6px 0;
  transition: all 0.3s;
  border-radius: 1px;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .section-label {
  margin-bottom: 20px;
}

.page-hero h1 {
  margin-bottom: 24px;
  max-width: 700px;
}

.page-hero .page-hero-desc {
  font-size: 20px;
  color: var(--gray-600);
  max-width: 600px;
  line-height: 1.7;
}

/* Dark page hero variant */
.page-hero-dark {
  background: var(--black);
  padding: calc(var(--nav-height) + 80px) 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
}
.page-hero-dark .container { position: relative; z-index: 1; }
.page-hero-dark h1 { color: var(--white); }
.page-hero-dark .page-hero-desc { color: rgba(255,255,255,0.5); }

/* ---- SECTIONS ---- */
.section {
  padding: 120px 0;
  position: relative;
}

.section-cream {
  background: var(--cream);
}

.section-dark {
  background: var(--black);
  color: var(--white);
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 24px 24px;
}
.section-dark .container { position: relative; z-index: 1; }

/* Notebook ruled lines background */
.section-ruled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 39px,
    rgba(0,0,0,0.03) 39px,
    rgba(0,0,0,0.03) 40px
  );
  z-index: 0;
}
.section-ruled .container { position: relative; z-index: 1; }

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 2px dashed var(--gray-200);
  transition: all 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-style: solid;
}

.card-color-top {
  position: relative;
  overflow: hidden;
}
.card-color-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.card-color-top.coral::before { background: var(--coral); }
.card-color-top.teal::before { background: var(--teal); }
.card-color-top.sky::before { background: var(--sky); }
.card-color-top.marigold::before { background: var(--marigold); }
.card-color-top.rose::before { background: var(--rose); }

/* ---- TAGS ---- */
.tag {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
  display: inline-block;
}

.tag-coral { background: rgba(255,107,74,0.1); color: var(--coral); }
.tag-teal { background: rgba(0,201,167,0.1); color: var(--teal); }
.tag-sky { background: rgba(91,141,239,0.1); color: var(--sky); }

/* ---- GRID LAYOUTS ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---- ACCENT BAR (for quotes) ---- */
.accent-bar {
  border-left: 4px solid var(--coral);
  padding-left: 24px;
}

/* ---- ICON WRAPPER ---- */
.icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

/* ---- CTA SECTION ---- */
.cta-section {
  padding: 120px 0;
  background: var(--black);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cta-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  z-index: 0;
}
.cta-section .container {
  position: relative;
  z-index: 1;
}
.cta-section h2 {
  color: var(--white);
  max-width: 700px;
  margin: 0 auto 24px;
}
.cta-section p {
  color: rgba(255,255,255,0.5);
  max-width: 500px;
  margin: 0 auto 40px;
  font-size: 17px;
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 72px 0 40px;
}

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

.footer-brand .footer-logo {
  margin-bottom: 16px;
}
.footer-brand .footer-logo svg {
  height: 32px;
  width: auto;
}
.footer-brand .footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
}
.footer-bottom a {
  color: rgba(255,255,255,0.3);
  transition: color 0.2s;
}
.footer-bottom a:hover { color: rgba(255,255,255,0.6); }

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.footer-socials a:hover {
  border-color: var(--coral);
  background: rgba(255,107,74,0.1);
}
.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,0.4);
}

/* ---- ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* ---- FORM ELEMENTS ---- */
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--black);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-secondary);
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--coral);
}
.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

/* ---- BLOG / INSIGHTS CARDS ---- */
.insight-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.35s ease;
}
.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.insight-card-img {
  aspect-ratio: 16/10;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}
.insight-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--gray-300) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}
.insight-card-body {
  padding: 28px;
}
.insight-card-meta {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.insight-card-body h3 {
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.3;
}
.insight-card-body p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ---- WORK / PORTFOLIO CARDS ---- */
.work-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.35s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.work-card-img {
  aspect-ratio: 3/2;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
}
.work-card-body {
  padding: 28px;
}
.work-card-body h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.work-card-type {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.work-card-body p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
}
.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- VALUES GRID ---- */
.value-card {
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
}
.value-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
}
.value-card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ---- TEAM / FOUNDER ---- */
.founder-photo {
  aspect-ratio: 4/5;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  border: 3px dashed var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.founder-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* ---- STATS ---- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  border: 1.5px solid var(--gray-200);
}
.stat-number {
  font-family: var(--font-primary);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ---- APPROACH STEPS ---- */
.approach-step {
  text-align: center;
  padding: 32px 20px;
}
.approach-num {
  font-family: var(--font-primary);
  font-size: 48px;
  font-weight: 800;
  color: var(--gray-200);
  margin-bottom: 16px;
  letter-spacing: -2px;
}
.approach-step h4 {
  margin-bottom: 12px;
}
.approach-step p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ---- TIMELINE ---- */
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-num {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  padding-top: 4px;
}
.timeline-item h3 {
  margin-bottom: 12px;
}
.timeline-item p {
  color: var(--gray-600);
  line-height: 1.7;
}

/* ---- COLOR SWATCHES (brand page) ---- */
.swatch {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.swatch-color {
  height: 100px;
}
.swatch-info {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.swatch-info h4 { font-size: 15px; margin-bottom: 4px; }
.swatch-info code { font-size: 13px; color: var(--gray-400); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; --nav-height: 64px; }

  .section { padding: 80px 0; }
  .page-hero { padding: calc(var(--nav-height) + 56px) 0 56px; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    background: var(--white);
    padding: 32px var(--gutter);
    gap: 8px;
    z-index: 99;
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    font-size: 18px;
    padding: 14px 16px;
    width: 100%;
  }
  .nav-toggle { display: block; }

  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .footer-legal { justify-content: center; }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ---- PRINT ---- */
@media print {
  .nav, .cta-section, .footer { display: none; }
  body { font-size: 12pt; }
  .section { padding: 40px 0; }
}
