/* ============================================
   KONONA GAMES — Website Styles (V2)

   Aesthetic: Refined warmth. Editorial confidence.
   Earthy palette, generous spacing, subtle texture.
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors — warm earth palette */
  --color-bg: #f8f6f3;
  --color-bg-alt: #f0ece6;
  --color-bg-hero: #f4f1ec;
  --color-surface: #ffffff;
  --color-text: #2c2926;
  --color-text-light: #6e6862;
  --color-text-lighter: #a39e98;
  --color-accent: #5a7247;
  --color-accent-hover: #475c38;
  --color-accent-subtle: rgba(90, 114, 71, 0.07);
  --color-accent-glow: rgba(90, 114, 71, 0.12);
  --color-border: #e2ddd6;
  --color-border-light: #ece8e2;
  --color-monogram-bg: #eae6df;
  --color-monogram-text: #5a7247;
  --color-dot-grid: rgba(44, 41, 38, 0.04);

  /* Typography */
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-hero: clamp(2.5rem, 5vw, 3.75rem);
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --line-height-body: 1.7;
  --line-height-heading: 1.15;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-wide: 0.08em;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-section: clamp(5rem, 10vw, 8rem);

  /* Layout */
  --max-width: 1080px;
  --max-width-narrow: 640px;
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --border-radius-full: 50%;

  /* Nav */
  --nav-height: 68px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* --- Reset & Base --- */
*,
*::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-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Subtle grain texture for depth (Linear-inspired layering) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

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


/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}


/* --- Dot Grid Background Texture --- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--color-dot-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 100%);
}


/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 243, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 8px rgba(44, 41, 38, 0.04);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: var(--letter-spacing-tight);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  color: var(--color-text);
}

.nav-logo-img {
  height: 28px;
  width: auto;
  transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
  transform: rotate(-12deg) scale(1.1);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-lighter);
  text-decoration: none;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  transition: color var(--transition-base);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 1px;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition-fast);
  border-radius: 1px;
}


/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  min-height: 60vh;
  background: var(--color-bg-hero);
  overflow: hidden;
}

/* Banner: flame logo + text composition */
.hero-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--max-width);
  animation: fadeUp 0.8s ease both;
}

.hero-flame {
  height: clamp(240px, 35vw, 420px);
  width: auto;
  flex-shrink: 0;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.1s;
}

.hero-text {
  margin-left: clamp(-5rem, -7vw, -2rem);
  margin-top: clamp(4rem, 8vw, 8rem);
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.3s;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.05;
  letter-spacing: var(--letter-spacing-tight);
  text-transform: uppercase;
  color: var(--color-text);
}

/* Diagonal line accents */
.hero-lines {
  position: absolute;
  pointer-events: none;
  animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: 0.5s;
}

.hero-lines--top {
  top: 0;
  right: 15%;
  width: clamp(160px, 25vw, 380px);
}

.hero-lines--bottom {
  bottom: 8%;
  right: 22%;
  width: clamp(36px, 5vw, 80px);
}

/* Soft gradient edge at hero bottom */
.hero-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

/* Centered accent divider below hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  z-index: 1;
}

/* --- Sections (shared) --- */
.section {
  padding: var(--space-section) var(--space-md);
  scroll-margin-top: var(--nav-height);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}


/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
}

.reveal.visible {
  animation: revealSection 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Staggered child reveals inside sections */
.reveal.visible .about-bullets li,
.reveal.visible .team-member,
.reveal.visible .contact-card {
  opacity: 0;
  animation: revealSection 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.reveal.visible .about-bullets li:nth-child(1),
.reveal.visible .team-member:nth-child(1),
.reveal.visible .contact-card:nth-child(1) { animation-delay: 0.1s; }
.reveal.visible .about-bullets li:nth-child(2),
.reveal.visible .team-member:nth-child(2),
.reveal.visible .contact-card:nth-child(2) { animation-delay: 0.22s; }
.reveal.visible .about-bullets li:nth-child(3),
.reveal.visible .team-member:nth-child(3),
.reveal.visible .contact-card:nth-child(3) { animation-delay: 0.34s; }

/* Active nav link */
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}


/* --- About --- */
.about-text {
  max-width: var(--max-width);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.85;
  color: var(--color-text-light);
  letter-spacing: -0.01em;
}


.about-bullets {
  list-style: none;
  max-width: var(--max-width);
  margin-top: var(--space-md);
}

.about-bullets li {
  position: relative;
  padding-left: 1.4em;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.85;
  color: var(--color-text-light);
  letter-spacing: -0.01em;
}

.about-bullets li + li {
  margin-top: var(--space-xs);
}

.about-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: var(--border-radius-full);
  background: var(--color-text);
}


/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 900px;
}

.team-member {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
}

.team-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 0 0 2px 2px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.team-member:hover {
  transform: translateY(-4px);
  border-color: rgba(90, 114, 71, 0.18);
  box-shadow:
    0 4px 12px rgba(44, 41, 38, 0.04),
    0 16px 48px rgba(44, 41, 38, 0.06);
}

.team-member:hover::before {
  opacity: 1;
}

.team-monogram {
  width: 72px;
  height: 72px;
  border-radius: var(--border-radius);
  background: var(--color-monogram-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-monogram-text);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-md);
  transition: var(--transition-smooth);
}

.team-member:hover .team-monogram {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(90, 114, 71, 0.2);
}

.team-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: 4px;
}

.team-role {
  font-size: var(--font-size-sm);
  color: var(--color-text-lighter);
  margin-bottom: var(--space-sm);
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #0a66c2;
  border-radius: 999px;
  color: #0a66c2;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  text-decoration: none;
}

.team-linkedin:hover {
  color: #fff;
  border-color: #0a66c2;
  background: #0a66c2;
}

.team-linkedin svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 900px;
}

.contact-card {
  background: var(--color-bg-alt);
  border: none;
  border-radius: var(--border-radius);
  padding: var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.contact-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.contact-card--link:hover {
  background: var(--color-monogram-bg);
  transform: translateY(-2px);
}

.contact-card--link:hover .contact-card-icon {
  border-color: var(--color-accent);
  transform: rotate(8deg);
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-full);
  border: 1.5px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
  transition: all var(--transition-smooth);
}

.contact-card-icon svg {
  width: 18px;
  height: 18px;
}

.contact-card-label {
  font-family: var(--font-display);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.contact-card-value {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.5;
}

.contact-card-value--accent {
  color: var(--color-accent);
}


/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-md);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer:hover::before {
  width: 120px;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-left {
  font-size: var(--font-size-sm);
  color: var(--color-text-lighter);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-text-lighter);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-lighter);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

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

.footer-social svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


/* --- Sub-page styles --- */
.page-header {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  background: var(--color-bg-hero);
  border-bottom: 1px solid var(--color-border-light);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text);
}

.page-content {
  padding: var(--space-xl) var(--space-md) var(--space-section);
}

.page-content .container {
  max-width: var(--max-width-narrow);
}

.page-content .date {
  font-size: var(--font-size-sm);
  color: var(--color-text-lighter);
  margin-bottom: var(--space-xl);
}

.page-content h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-xl);
}

.page-content h3:first-of-type {
  margin-top: 0;
}

.page-content p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.page-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-subtle);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast);
}

.page-content a:hover {
  text-decoration-color: var(--color-accent);
}

/* Support page */
.support-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  max-width: 480px;
}

.support-card p {
  margin-bottom: var(--space-lg);
}

.support-card .contact-email {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}


/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .team-member {
    padding: var(--space-md) var(--space-sm);
  }

  .team-monogram {
    width: 60px;
    height: 60px;
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
    padding: var(--space-xl) var(--space-md);
  }

  .hero-lines--top {
    width: clamp(120px, 20vw, 200px);
  }

  .hero-lines--bottom {
    width: clamp(30px, 4vw, 50px);
  }

  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .contact-card {
    padding: var(--space-sm);
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .footer-right {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(248, 246, 243, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    gap: var(--space-md);
  }

  .nav-toggle {
    display: block;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    max-width: 300px;
    margin: 0 auto;
  }

  .team-member {
    padding: var(--space-lg) var(--space-md);
  }

  .team-monogram {
    width: 72px;
    height: 72px;
    font-size: 1.125rem;
  }

  .hero {
    min-height: auto;
    padding: var(--space-lg) var(--space-md);
  }

  .hero-banner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    margin-left: 0;
    margin-top: var(--space-sm);
  }

  .hero-flame {
    height: clamp(180px, 45vw, 260px);
  }

  .hero-lines--top {
    width: clamp(80px, 18vw, 140px);
  }

  .hero-lines--bottom {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }
}
