/* ── HERO (casino background image + overlay like Figma) ── */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 80px 80px;
  color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: url('https://images.unsplash.com/photo-1768839723101-b55bdb4e3ced?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjYXNpbm8lMjBibGFja2phY2slMjB0YWJsZSUyMGJldHRpbmclMjBjaGlwc3xlbnwxfHx8fDE3NzAwNjA5MTF8MA&ixlib=rb-4.1.0&q=80&w=1080');
  background-size: cover; background-position: center;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.9) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 1000px; }
.hero h1 { color: #fff; margin-bottom: 24px; }
.hero h1 .accent { color: var(--accent-gold); }
.hero__sub {
  font-size: 20px; color: var(--color-text-secondary); margin-bottom: 32px;
  line-height: 1.6; max-width: 700px; margin-left: auto; margin-right: auto;
}
.hero__actions { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* Sub-page hero — no background image */
.hero--page {
  min-height: 50vh; padding: 140px 80px 80px;
  background: linear-gradient(to bottom, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}
.hero--page::before { display: none; }
.hero--page::after { display: none; }
.hero--page h1 { font-size: clamp(36px, 5vw, 56px); }

@media (max-width: 768px) {
  .hero { min-height: 90vh; padding: 120px 20px 60px; }
  .hero__sub { font-size: 16px; }
  .hero--page { padding: 120px 20px 60px; }
}

/* ── SECTION ── */
.section { padding: 80px 0; }
.section__header { margin-bottom: 48px; text-align: center; }
.section__header h2 { margin-bottom: 12px; }
.section__header p { color: var(--color-text-secondary); font-size: 18px; max-width: 700px; margin: 0 auto; }

/* ── DIVIDER ── */
.section + .section { border-top: 1px solid var(--color-border); }

/* ── GRID LAYOUTS ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-5-wrap {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
}
.grid-5-wrap > * {
  flex: 0 0 calc(33.333% - 16px); min-width: 0;
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-5-wrap > * { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 600px) {
  .grid-3, .grid-2, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .grid-5-wrap > * { flex: 0 0 100%; }
}

/* ── SOLUTION CARD (glass-card style) ── */
.sol-card {
  background: var(--glass-overlay); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.sol-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.sol-card__icon {
  font-size: 40px; margin-bottom: 24px;
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.1); border-radius: var(--radius-lg);
}
.sol-card h3 { margin-bottom: 12px; color: var(--color-text-white); font-size: 24px; }
.sol-card p { color: var(--color-text-secondary); font-size: 16px; flex: 1; margin-bottom: 24px; line-height: 1.6; }
.sol-card .btn { align-self: flex-start; }
.sol-card:hover h3 { color: var(--accent-gold); }

/* ── FEATURE CARD (compact, gold hover) ── */
.feat-card {
  background: var(--glass-overlay); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer; text-decoration: none; color: inherit; display: block;
  overflow: hidden;
}
.feat-card--has-img { padding: 0; }
.feat-card--has-img .feat-card__icon,
.feat-card--has-img .feat-card__name,
.feat-card--has-img .feat-card__arrow { margin-left: 24px; margin-right: 24px; }
.feat-card--has-img .feat-card__icon { margin-top: 20px; }
.feat-card--has-img .feat-card__arrow { margin-bottom: 24px; }
.feat-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); color: inherit; }
.feat-card:hover .feat-card__name { color: var(--accent-gold); }
.feat-card__img {
  width: 100%; height: 140px; overflow: hidden;
}
.feat-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.65);
}
.feat-card:hover .feat-card__img img { transform: scale(1.08); filter: brightness(0.8); }
.feat-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); color: inherit; }
.feat-card:hover .feat-card__name { color: var(--accent-gold); }
.feat-card__icon {
  font-size: 36px; margin-bottom: 16px;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.15); border-radius: var(--radius-lg);
}
.feat-card__icon svg { width: 40px; height: 40px; }
.feat-card__name { font-size: 16px; font-weight: 600; color: var(--color-text-white); transition: var(--transition-fast); }
.feat-card__arrow {
  color: var(--accent-gold); font-size: 14px; margin-top: 8px; display: block;
  opacity: 0; transition: var(--transition-fast);
}
.feat-card:hover .feat-card__arrow { opacity: 1; }

/* ── RESOURCE SHELF ── */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .shelf { grid-template-columns: 1fr; } }

/* ── BREADCRUMB ── */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--color-text-dim); }
.breadcrumb a { color: var(--color-text-dim); }
.breadcrumb a:hover { color: var(--accent-gold); }
.breadcrumb span { margin: 0 8px; }

/* ── PAGE CONTENT ── */
#app { min-height: 100vh; padding-top: 72px; }

/* ── HUB PAGE ── */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* ── CONTACT FORM (glass card) ── */
.contact-form {
  max-width: 700px; margin: 0 auto;
  background: var(--glass-overlay); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 48px;
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .contact-form .form-row { grid-template-columns: 1fr; } .contact-form { padding: 24px; } }

/* ── RESOURCES PAGE ── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center; }
.filter-btn {
  padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: transparent; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition-fast); color: var(--color-text-secondary);
}
.filter-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  color: #1a1a1a; border-color: var(--accent-gold);
}

/* ── OUTCOMES ── */
.outcomes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.outcome {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 16px; color: var(--color-text-secondary); line-height: 1.6;
}
.outcome::before { content: '✓'; color: var(--accent-gold); font-weight: 700; flex-shrink: 0; }

/* ── CUSTOMER STORIES ── */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.story-card {
  background: var(--glass-overlay); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.story-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.story-card__video {
  width: 100%; aspect-ratio: 16/9; background: #000;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; position: relative; overflow: hidden;
}
.story-card__video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: var(--transition-fast); }
.story-card:hover .story-card__video img { opacity: 0.9; transform: scale(1.05); }
.story-card__video::after {
  content: '▶'; position: absolute; font-size: 20px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  width: 52px; height: 52px; color: #1a1a1a;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding-left: 3px;
}
.story-card__body { padding: 20px; }
.story-card__title { font-size: 15px; font-weight: 600; color: var(--color-text-white); }
.story-card__type { font-size: 13px; color: var(--color-text-dim); margin-top: 4px; }

/* ── SCALE METRICS (ivs.rocks-style vibrant cards) ── */
.metrics-section {
  padding: 120px 0;
  background: linear-gradient(to bottom, var(--color-bg-primary), var(--color-bg-secondary));
}
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 48px; }
.metric-card {
  text-align: center; padding: 48px 24px;
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0.15; border-radius: inherit;
}
.metric-card:nth-child(1) { background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05)); border: 1px solid rgba(212,175,55,0.3); }
.metric-card:nth-child(2) { background: linear-gradient(135deg, rgba(0,200,150,0.2), rgba(0,200,150,0.05)); border: 1px solid rgba(0,200,150,0.3); }
.metric-card:nth-child(3) { background: linear-gradient(135deg, rgba(100,140,255,0.2), rgba(100,140,255,0.05)); border: 1px solid rgba(100,140,255,0.3); }
.metric-card:nth-child(4) { background: linear-gradient(135deg, rgba(200,100,255,0.2), rgba(200,100,255,0.05)); border: 1px solid rgba(200,100,255,0.3); }
.metric-card__icon {
  width: 64px; height: 64px; margin: 0 auto 24px;
  background: rgba(255,255,255,0.08); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.metric-card:nth-child(1) .metric-card__icon { color: var(--accent-gold); }
.metric-card:nth-child(2) .metric-card__icon { color: #00c896; }
.metric-card:nth-child(3) .metric-card__icon { color: #648cff; }
.metric-card:nth-child(4) .metric-card__icon { color: #c864ff; }
.metric-card__value {
  font-size: clamp(48px, 6vw, 64px); font-weight: 900;
  color: #fff;
  margin-bottom: 8px; line-height: 1;
}
.metric-card:nth-child(1) .metric-card__value { color: var(--accent-gold); }
.metric-card:nth-child(2) .metric-card__value { color: #00c896; }
.metric-card:nth-child(3) .metric-card__value { color: #648cff; }
.metric-card:nth-child(4) .metric-card__value { color: #c864ff; }
.metric-card__label { font-size: 16px; color: var(--color-text-secondary); font-weight: 500; }

.customer-logos {
  text-align: center; padding-top: 32px;
}
.customer-logos__label {
  font-size: 12px; color: var(--color-text-secondary); text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 24px;
}
.customer-logos__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; }
.customer-logos__item {
  font-size: 24px; font-weight: 700; color: rgba(255,255,255,0.2);
  transition: var(--transition-fast); cursor: pointer;
}
.customer-logos__item:hover { color: var(--accent-gold); }

@media (max-width: 1024px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .metrics-grid { grid-template-columns: 1fr; } }

/* ── FADE-IN ANIMATION ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }


/* ── SOLUTION CARD WITH IMAGE ── */
.sol-card__img {
  width: 100%; height: 180px; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -32px -32px 24px -32px; width: calc(100% + 64px);
}
.sol-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.7);
}
.sol-card:hover .sol-card__img img { transform: scale(1.08); filter: brightness(0.85); }
.sol-card__body { flex: 1; display: flex; flex-direction: column; }
.sol-card__icon-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.sol-card__icon-wrap {
  width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.15); border-radius: var(--radius-md);
  color: var(--accent-gold);
}
.sol-card__body p { flex: 1; }

/* ── FEATURE HERO WITH BG IMAGE ── */
.hero--feature {
  min-height: 55vh; padding: 140px 80px 80px;
  position: relative;
}
.hero--feature::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: inherit; background-size: cover; background-position: center;
}
.hero--feature::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(26,26,26,0.95) 100%);
}
.hero--feature .hero__content { position: relative; z-index: 2; }
.hero--feature h1 { font-size: clamp(36px, 5vw, 56px); }

@media (max-width: 768px) {
  .hero--feature { padding: 120px 20px 60px; }
}

/* ── BENEFIT CARD ── */
.benefit-card { display: flex; flex-direction: column; gap: 16px; }
.benefit-card__icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.1); border-radius: var(--radius-md);
  color: var(--accent-gold);
}
.benefit-card h4 { font-size: 20px; font-weight: 600; }
.benefit-card p { font-size: 15px; color: var(--color-text-secondary); line-height: 1.6; margin: 0; }

/* ── SVG ICON COLORS ── */
.feat-card__icon { color: var(--accent-gold); }
.feat-card:hover .feat-card__icon { color: var(--accent-gold-light); }
.metric-card__icon { color: var(--accent-gold); }
.resource-card__arrow svg { width: 16px; height: 16px; }
.story-card__type { display: flex; align-items: center; gap: 6px; }
.story-card__type svg { width: 14px; height: 14px; }

/* ── BTN SVG ALIGNMENT ── */
.btn svg { width: 18px; height: 18px; vertical-align: middle; }


/* ── SWITCH TO AWS PAGE ── */

/* Hero — standard page style, no black override */
.hero--switch {
  background: linear-gradient(to bottom, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}
.hero--switch::before { display: none; }
.hero--switch::after { display: none; }

/* ── USE CASE CARDS WITH IMAGES ── */
a.switch-usecase {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.switch-usecase:hover {
  color: inherit;
}
.switch-usecase {
  background: var(--glass-overlay);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.switch-usecase:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.switch-usecase__img {
  width: 100%; height: 160px; overflow: hidden;
}
.switch-usecase__img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.6);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.switch-usecase:hover .switch-usecase__img img {
  transform: scale(1.08); filter: brightness(0.75);
}
.switch-usecase__body {
  padding: 24px; flex: 1; display: flex; flex-direction: column;
}
.switch-usecase__body h4 {
  font-size: 18px; margin-bottom: 8px; color: var(--color-text-white);
}
.switch-usecase__body p {
  font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; margin: 0;
}

/* ── COMPARISON TABLE — light, contrasty, Cloudflare-branded ── */
.switch-compare {
  position: relative;
  background: rgba(255,255,255,0.04);
  margin-left: -80px;
  margin-right: -80px;
  padding-left: 80px;
  padding-right: 80px;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .switch-compare {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

.compare-table {
  max-width: 1100px;
  margin: 0 auto;
}

.compare-table__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}

.compare-table__col-label {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: 18px 20px;
}

/* Cloudflare column header — FULL orange brand */
.compare-table__col-label--them {
  background: #F48120;
  color: #fff;
}

/* AWS column header — gold brand */
.compare-table__col-label--us {
  background: var(--accent-gold);
  color: #1a1a1a;
}

.compare-row {
  margin-bottom: 2px;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
}

.compare-row:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}

.compare-row__title {
  padding: 20px 24px 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-white);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.compare-row__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.compare-col {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.6;
  padding: 16px 20px;
}

/* Cloudflare side — solid orange-tinted background */
.compare-col--them {
  background: rgba(244, 129, 32, 0.12);
  color: rgba(255,255,255,0.8);
  border-left: none;
  border-radius: 0;
}

/* AWS side — subtle gold tint */
.compare-col--us {
  background: rgba(212, 175, 55, 0.06);
  color: rgba(255,255,255,0.85);
  border-left: none;
  border-radius: 0;
}

.compare-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
}

/* Cloudflare ✕ — strong orange */
.compare-icon--no {
  background: #F48120;
  color: #fff;
}

/* AWS ✓ — green */
.compare-icon--yes {
  background: var(--accent-neon-green);
  color: #1a1a1a;
}

.compare-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-neon-green);
  text-decoration: none;
}
.compare-link:hover {
  color: #fff;
  text-decoration: underline;
}

.compare-col__text {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}
.compare-col__text:hover {
  color: var(--accent-neon-green);
}
.compare-col__text svg {
  transition: opacity 0.15s ease;
}
.compare-col__text:hover svg {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .compare-table__header { grid-template-columns: 1fr; gap: 2px; }
  .compare-row__cols { grid-template-columns: 1fr; gap: 2px; }
  .compare-col--them::before { content: 'Other CDN: '; font-weight: 700; color: #F48120; }
  .compare-col--us::before { content: 'CloudFront: '; font-weight: 700; color: var(--accent-gold); }
}

/* ── ARCHITECTURE DIAGRAM ── */
.arch-diagram {
  max-width: 800px;
  margin: 0 auto;
}

.arch-code {
  background: var(--color-bg-darkest);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--accent-neon-green);
  overflow-x: auto;
  white-space: pre;
}

/* ── SWITCH CTA BOX ── */
.switch-cta__box {
  text-align: center;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, rgba(0,255,136,0.05) 100%);
  border: 1px solid rgba(212,175,55,0.2);
}

.switch-cta__box h3 {
  font-size: 32px;
  margin-bottom: 16px;
}

.switch-cta__box p {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}
