/* ==========================================================================
   TekyTeen — modern front-end (Allinnovat site family)
   Brand tokens shared with allinnovat.com; accent green-forward, playful.
   ========================================================================== */

:root {
  --navy: #1b2a5e;
  --navy-deep: #0c1430;
  --blue: #2f6fed;
  --blue-soft: #e3ecfd;
  --green: #57b25e;
  --green-soft: #e9f6ea;
  --mint: #f2f9f3;
  --ink: #1c2333;
  --ink-soft: #4c5568;
  --line: #e4e9f2;
  --bg-alt: #f7f9fc;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(27, 42, 94, .12);
  --shadow-sm: 0 4px 14px rgba(27, 42, 94, .08);
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

section { padding: 88px 0; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin-bottom: 12px;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 42px;
}

.section-head { text-align: center; margin-bottom: 48px; }

.anchor-target {
  display: block;
  position: relative;
  top: -84px;
  visibility: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 22px rgba(87, 178, 94, .35);
}
.btn-primary:hover { background: #4aa251; }

.btn-outline {
  border-color: var(--line);
  color: var(--navy);
  background: #fff;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-whatsapp {
  background: var(--green-soft);
  color: var(--green);
  padding: 9px 18px;
  font-size: .88rem;
}
.btn-whatsapp:hover { background: var(--green); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
  padding: 18px 0;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }

.brand img {
  height: 44px;
  width: auto;
  border-radius: 10px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-weight: 600;
  font-size: .94rem;
  color: var(--ink-soft);
  transition: color .15s ease;
}

.main-nav a:hover { color: var(--green); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--navy);
  font-size: 1.35rem;
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 4%;
    right: 4%;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  .main-nav.open { opacity: 1; visibility: visible; transform: none; }

  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }

  .main-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
  }

  .main-nav a:hover { background: var(--mint); }

  .main-nav .btn-whatsapp { justify-content: center; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 150px 0 90px;
  background:
    radial-gradient(700px 420px at 88% -10%, rgba(87, 178, 94, .18), transparent 60%),
    radial-gradient(650px 420px at -8% 30%, rgba(47, 111, 237, .14), transparent 60%),
    linear-gradient(180deg, var(--mint), #fff 78%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  letter-spacing: -.02em;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--green);
  position: relative;
}

.hero-body {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-art img {
  width: min(360px, 80%);
  filter: drop-shadow(0 24px 44px rgba(27, 42, 94, .22));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

.hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 9px 16px;
  font-weight: 700;
  font-size: .82rem;
  color: var(--navy);
}

.hero-chip i { color: var(--green); }
.hero-chip.chip-a { top: 12%; left: 2%; animation: bob 6s ease-in-out infinite; }
.hero-chip.chip-b { bottom: 14%; right: 0; animation: bob 7s ease-in-out 1s infinite; }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-size: 1.4rem;
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-body { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { width: min(220px, 60%); }
}

/* ---------- Stats strip ---------- */
.stats {
  padding: 0 0 30px;
  margin-top: -56px;
  position: relative;
  z-index: 5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 26px;
}

.stat { text-align: center; }

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--navy);
}

.stat b span { color: var(--green); }

.stat small {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .85rem;
}

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

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 52px;
  align-items: center;
}

.about-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

.about-copy .section-title { text-align: left; }
.about-copy .about-body { color: var(--ink-soft); }
.about-copy .about-body p { margin: 0 0 1em; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Why us ---------- */
.why { background: var(--bg-alt); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.why-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.5rem;
}

.why-card h3 { font-size: 1.15rem; }
.why-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

@media (max-width: 860px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ---------- Video ---------- */
.video-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.video-facade {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--navy-deep) url("") center/cover no-repeat;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 20, 48, .25), rgba(12, 20, 48, .55));
}

.video-play {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 12px 30px rgba(87, 178, 94, .5);
  transition: transform .2s ease;
}

.video-facade:hover .video-play { transform: scale(1.1); }

.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

/* ---------- Category cards ---------- */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 26px;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.cat-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blue-soft);
}

.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.cat-card:hover .cat-card-img img { transform: scale(1.06); }

.cat-card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }

.cat-card-body h3 { font-size: 1.12rem; }
.cat-card-body p { color: var(--ink-soft); font-size: .93rem; flex: 1; }

.cat-card .btn { align-self: flex-start; padding: 10px 20px; font-size: .88rem; }

/* ---------- Featured tutorials ---------- */
.featured { background: var(--navy-deep); }
.featured .section-title,
.featured h3 { color: #fff; }
.featured .section-lead { color: #b7c0da; }

.featured-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 340px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 6px 22px;
  scrollbar-color: var(--green) transparent;
}

.feat-card {
  scroll-snap-align: start;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}

.feat-card:hover { transform: translateY(-5px); border-color: var(--green); }

.feat-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
}

.feat-card-img img { width: 100%; height: 100%; object-fit: cover; }

.feat-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.feat-card-body h3 { font-size: 1.05rem; margin: 0; }
.feat-card-body p { color: #b7c0da; font-size: .9rem; flex: 1; margin: 0; }

.feat-badge {
  align-self: flex-start;
  background: rgba(87, 178, 94, .18);
  color: var(--green);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.feat-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.feat-nav button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s ease, border-color .15s ease;
}

.feat-nav button:hover { background: var(--green); border-color: var(--green); }

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(120deg, var(--green) 0%, #3f9a4c 100%); }

.newsletter-inner {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.newsletter .section-title { color: #fff; }
.newsletter .section-lead { color: rgba(255, 255, 255, .85); }

.newsletter-form {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 8px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.newsletter-form input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  min-width: 0;
  background: transparent;
}

.newsletter-form .btn { border-radius: 11px; }

.newsletter-msg {
  margin-top: 16px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius);
  display: none;
}

.newsletter-msg.show { display: block; }
.newsletter-msg.ok { background: rgba(255, 255, 255, .92); color: #2c7a34; }
.newsletter-msg.err { background: rgba(255, 255, 255, .92); color: #c0392b; }

@media (max-width: 560px) {
  .newsletter-form { flex-direction: column; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.contact-info-card h3 { font-size: 1.2rem; }

.contact-line {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 0;
  color: var(--ink-soft);
  font-weight: 600;
  word-break: break-all;
}

.contact-line i {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--green);
  box-shadow: var(--shadow-sm);
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: 6px;
  color: var(--navy);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 15px;
  font: inherit;
  font-size: .94rem;
  color: var(--ink);
  background: var(--bg-alt);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(87, 178, 94, .18);
  background: #fff;
}

.field textarea { min-height: 130px; resize: vertical; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-status {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .92rem;
}

.form-status.show { display: block; }
.form-status.ok { background: var(--green-soft); color: #2c7a34; }
.form-status.err { background: #fdecea; color: #c0392b; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Category page ---------- */
.cat-hero {
  padding: 150px 0 60px;
  background:
    radial-gradient(600px 340px at 90% 0%, rgba(87, 178, 94, .18), transparent 60%),
    linear-gradient(180deg, var(--mint), #fff);
}

.cat-hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 34px;
  align-items: center;
}

.cat-hero-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 14px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.link-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.link-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.link-card-img {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--blue-soft);
}

.link-card-img img { width: 100%; height: 100%; object-fit: cover; }

.link-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }

.link-card-body h3 { font-size: 1.05rem; }
.link-card-body p { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.link-card-body .res-url {
  font-size: .8rem;
  color: var(--ink-soft);
  word-break: break-all;
  margin-bottom: 14px;
}

.not-found {
  text-align: center;
  padding: 60px 0 90px;
}

.not-found .section-title { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #b7c0da;
  padding: 46px 0 30px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { height: 36px; border-radius: 8px; }
.footer-brand span { font-family: var(--font-head); font-weight: 800; color: #fff; }

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

.footer-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  color: #cdd5ea;
  transition: background .15s ease, color .15s ease;
}

.footer-social a:hover { background: var(--green); color: #fff; }

.footer-copy {
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 20px;
  margin-top: 8px;
  font-size: .88rem;
}

.footer-copy a { color: var(--green); font-weight: 700; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art img, .hero-chip, .hero-scroll { animation: none; }
}
