/* ═══════════════════════════════════════════════════════════
   KindleWorks — Targo Template Design System
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --kw-accent: #e85d26;
  --kw-accent-hover: #f47b4a;
  --kw-accent-border: #c44d1e;
  --kw-accent-glow: rgba(232, 93, 38, 0.35);
  --kw-bg: #F2F1F0;
  --kw-bg-alt: #F7F6F8;
  --kw-heading: #2b3033;
  --kw-nav: #3a3a3a;
  --kw-body: #6b6f72;
  --kw-dark: #1a1c1e;
  --kw-white: #ffffff;
  --kw-chamfer: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  --kw-chamfer-sm: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

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

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

body {
  font-family: 'Quantico', 'Arial Narrow', sans-serif;
  background: var(--kw-bg);
  color: var(--kw-body);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--kw-nav);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #000;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection {
  background: rgba(232, 93, 38, 0.2);
  color: var(--kw-heading);
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 56px);
  padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 48px) 0;
  z-index: 100;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo-circle img {
  height: clamp(24px, 4vw, 32px);
  width: auto;
  object-fit: contain;
}

.nav__logo-img {
  width: 28px;
  height: auto;
  object-fit: contain;
}

.nav__logo-text {
  font-size: clamp(22px, 5vw, 26px);
  font-weight: 500;
  color: var(--kw-heading);
  letter-spacing: -0.2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav__link {
  font-weight: 700;
  font-size: clamp(12px, 2.4vw, 15px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kw-nav);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav__link:hover {
  color: var(--kw-accent);
}

.nav__link--accent {
  color: var(--kw-accent);
  border: 1px solid var(--kw-accent);
  padding: 8px 16px;
  border-radius: 4px;
  clip-path: var(--kw-chamfer-sm);
}

.nav__link--accent:hover {
  background: var(--kw-accent);
  color: var(--kw-white);
}

.nav__cta-wrap {
  margin-left: auto;
}

.nav__contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--kw-nav);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 26px;
  font-family: 'Quantico', sans-serif;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 700;
  cursor: pointer;
  clip-path: var(--kw-chamfer-sm);
  transition: background 0.3s ease;
}

.nav__contact-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile-menu {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 18px;
  padding: 20px 0;
}

.nav__mobile-menu.is-open {
  display: flex;
}

.nav__mobile-menu a {
  font-weight: 700;
  font-size: 16px;
  color: var(--kw-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  background: var(--kw-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero__video {
  position: absolute;
  top: 0;
  right: -20%;
  width: 99%;
  height: auto;
  pointer-events: none;
  z-index: 0;
  object-fit: contain;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #F2F1F0 0%, #F2F1F0 55%, rgba(242,241,240,0.85) 78%, rgba(242,241,240,0) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__headline {
  padding: min(clamp(40px,9vw,120px),9vh) 20px min(clamp(24px,4vw,44px),5vh) clamp(20px,9vw,118px);
}

.hero__headline h1 {
  font-size: min(clamp(34px,7.6vw,80px), 9.2vh);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-heading);
}

.hero__headline h1 span {
  display: block;
}

.hero__headline h1 .indent {
  padding-left: min(238px, 28vw);
}

.hero__headline h1 .accent {
  color: var(--kw-accent);
}

.hero__cta-wrap {
  padding: 0 20px min(clamp(36px,6vw,80px),7vh) calc(clamp(20px,9vw,118px) + min(238px,28vw));
}

/* ═══════════════════════════════════════════════════════════
   CHAMFERED BUTTON
   ═══════════════════════════════════════════════════════════ */
.btn-chamfer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--kw-accent);
  border: 1px solid var(--kw-accent-border);
  color: var(--kw-dark);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 18px 34px;
  font-size: clamp(13px, 2.2vw, 16px);
  font-family: 'Quantico', sans-serif;
  cursor: pointer;
  clip-path: var(--kw-chamfer);
  box-shadow: 0 0 0 1px var(--kw-accent-glow), 0 10px 30px -12px rgba(200, 77, 30, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.btn-chamfer:hover {
  background: var(--kw-accent-hover);
  box-shadow: 0 0 0 2px var(--kw-accent-glow), 0 14px 40px -10px rgba(200, 77, 30, 0.7);
  color: var(--kw-dark);
}

.btn-chamfer::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--kw-dark);
}

/* ═══════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════ */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  background: linear-gradient(180deg, #F2F1F0 0%, #F7F6F8 18%, #F7F6F8 100%);
  padding: clamp(60px,10vw,140px) 0 clamp(30px,5vw,70px) clamp(20px,9vw,118px);
}

.about__left {
  flex: 1 1 420px;
  min-width: 300px;
}

.about__heading {
  font-size: clamp(34px, 6.5vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-heading);
}

.about__heading .indent {
  display: block;
  padding-left: min(160px, 18vw);
  color: var(--kw-accent);
}

.about__text {
  max-width: 520px;
  margin: 32px 0 0 min(160px, 18vw);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--kw-body);
}

.about__cta {
  margin: 36px 0 0 min(160px, 18vw);
}

.about__right {
  flex: 1 1 360px;
  min-width: 280px;
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.about__video-wrap {
  position: relative;
  width: 100%;
  max-width: 644px;
}

.about__video {
  width: 100%;
  height: auto;
  display: block;
}

.about__video-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 644px;
  height: 100%;
  background: var(--kw-accent);
  mix-blend-mode: hue;
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO SECTION
   ═══════════════════════════════════════════════════════════ */
.portfolio {
  padding: clamp(60px,10vw,140px) clamp(20px,9vw,118px);
  background: var(--kw-bg);
}

.portfolio__label {
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kw-accent);
  margin-bottom: 12px;
}

.portfolio__heading {
  font-size: clamp(34px, 6.5vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-heading);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.portfolio__heading .indent {
  display: block;
  padding-left: min(160px, 18vw);
  color: var(--kw-accent);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 32px;
}

.project-card {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  background: #fff;
}

.project-card__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card__img {
  transform: scale(1.05);
}

.project-card__content {
  padding: 28px 32px;
}

.project-card__title {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--kw-heading);
  margin-bottom: 8px;
}

.project-card__desc {
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.6;
  color: var(--kw-body);
  margin-bottom: 20px;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--kw-accent);
  transition: gap 0.3s ease;
}

.project-card__link:hover {
  gap: 14px;
  color: var(--kw-accent-hover);
}

.project-card__link::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--kw-accent);
}

/* ═══════════════════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════════════════ */
.features {
  position: relative;
  padding: clamp(60px,10vw,140px) clamp(20px,9vw,118px);
  background: linear-gradient(180deg, var(--kw-bg) 0%, var(--kw-bg-alt) 100%);
  overflow: hidden;
}

.features__inner {
  position: relative;
  z-index: 2;
}

.features__label {
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kw-accent);
  margin-bottom: 12px;
}

.features__heading {
  font-size: clamp(34px, 6.5vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-heading);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.features__heading .indent {
  display: block;
  padding-left: min(160px, 18vw);
  color: var(--kw-accent);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.feat-card {
  background: var(--kw-white);
  border: 1px solid rgba(0,0,0,0.06);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 36px 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(24px);
}

.feat-card.is-visible {
  animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.feat-card:nth-child(1).is-visible { animation-delay: 0s; }
.feat-card:nth-child(2).is-visible { animation-delay: 0.08s; }
.feat-card:nth-child(3).is-visible { animation-delay: 0.16s; }
.feat-card:nth-child(4).is-visible { animation-delay: 0.24s; }
.feat-card:nth-child(5).is-visible { animation-delay: 0.32s; }
.feat-card:nth-child(6).is-visible { animation-delay: 0.4s; }

.feat-card:hover {
  border-color: var(--kw-accent);
  transform: translateY(-4px);
}

.feat-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(232, 93, 38, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--kw-accent);
}

.feat-card__title {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--kw-heading);
  margin-bottom: 10px;
}

.feat-card__desc {
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.65;
  color: var(--kw-body);
}

/* ═══════════════════════════════════════════════════════════
   PRICING SECTION
   ═══════════════════════════════════════════════════════════ */
.pricing {
  padding: clamp(60px,10vw,140px) clamp(20px,9vw,118px);
  background: var(--kw-bg-alt);
}

.pricing__label {
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kw-accent);
  margin-bottom: 12px;
}

.pricing__heading {
  font-size: clamp(34px, 6.5vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-heading);
  margin-bottom: 12px;
}

.pricing__heading .indent {
  display: block;
  padding-left: min(160px, 18vw);
  color: var(--kw-accent);
}

.pricing__sub {
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--kw-body);
  max-width: 600px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.price-card {
  background: var(--kw-white);
  border: 1px solid rgba(0,0,0,0.06);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.price-card:hover {
  border-color: var(--kw-accent);
  transform: translateY(-4px);
}

.price-card--featured {
  border: 2px solid var(--kw-accent);
  position: relative;
}

.price-card__badge {
  position: absolute;
  top: -1px;
  right: 32px;
  background: var(--kw-accent);
  color: var(--kw-white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  padding-bottom: 14px;
}

.price-card__name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kw-body);
  margin-bottom: 8px;
}

.price-card__price {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--kw-heading);
  margin-bottom: 4px;
}

.price-card__price-range {
  font-size: 14px;
  color: var(--kw-body);
  margin-bottom: 24px;
}

.price-card__suited {
  font-size: 14px;
  line-height: 1.6;
  color: var(--kw-body);
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.price-card__features {
  flex: 1;
  margin-bottom: 28px;
}

.price-card__features li {
  font-size: 14px;
  color: var(--kw-heading);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.price-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid var(--kw-accent);
  transform: translateY(-50%) rotate(45deg);
}

.price-card__btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT CTA SECTION
   ═══════════════════════════════════════════════════════════ */
.shader-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.contact-cta {
  padding: clamp(80px,12vw,180px) clamp(20px,9vw,118px);
  background: var(--kw-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-cta__inner {
  position: relative;
  z-index: 2;
}

.contact-cta__heading {
  font-size: clamp(34px, 7vw, 80px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--kw-white);
  margin-bottom: 20px;
}

.contact-cta__heading .accent {
  color: var(--kw-accent);
}

.contact-cta__text {
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto 40px;
}

.contact-cta .btn-chamfer {
  color: var(--kw-dark);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: 28px clamp(20px,9vw,118px);
  background: #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.footer__links a:hover {
  color: var(--kw-accent);
}

/* ═══════════════════════════════════════════════════════════
   REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staircase text reveal */
.stair-line {
  display: block;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stair-line.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — 700px breakpoint
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .nav__links,
  .nav__cta-wrap {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero__video {
    right: auto;
    left: -12%;
    width: 119%;
  }

  .hero__scrim {
    display: none;
  }

  .hero__headline {
    margin-top: 360px;
    padding: 0 20px 28px 20px;
  }

  .hero__headline h1 {
    font-size: clamp(34px, 10vw, 56px);
  }

  .hero__cta-wrap {
    padding: 0 20px 40px 20px;
  }

  .about {
    padding: clamp(40px,8vw,80px) 20px;
  }

  .about__text {
    margin-left: 0;
  }

  .about__cta {
    margin-left: 0;
  }

  .about__heading .indent {
    padding-left: min(80px, 12vw);
  }

  .portfolio {
    padding: clamp(40px,8vw,80px) 20px;
  }

  .features {
    padding: clamp(40px,8vw,80px) 20px;
  }

  .pricing {
    padding: clamp(40px,8vw,80px) 20px;
  }

  .contact-cta {
    padding: clamp(60px,10vw,120px) 20px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
