/* ==========================================================================
   Cafe Sapa - kvgames.studio
   Palette sampled from the game's own key art.
   ========================================================================== */

:root {
  --cream:       #FDE7C3;  /* cafe wall */
  --cream-deep:  #F8D9AB;  /* band separator */
  --peach:       #F2C6A0;  /* floor tile */
  --paper:       #FFF8EA;  /* speech bubble / card */
  --cocoa:       #452612;  /* "Cafe" wordmark brown - body text */
  --cocoa-soft:  #7A5539;  /* secondary text */
  --grape:       #5B4CC7;  /* "Sapa" purple - primary accent */
  --grape-deep:  #46379F;
  --leaf:        #4E9A3E;  /* the swoosh */
  --shadow:      rgba(69, 38, 18, .16);
  --shadow-soft: rgba(69, 38, 18, .08);
  --maxw:        1140px;
  --radius:      18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is essential — without it, a width/height attribute pair keeps the
   height pinned while max-width shrinks the width, squashing the image. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--grape-deep); }

:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Nav ---------------------------------------------------------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(253, 231, 195, .92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(69, 38, 18, .08);
}

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-logo img { height: 34px; width: auto; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 15px;
  letter-spacing: .3px;
  color: var(--cocoa);
  text-decoration: none;
}

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

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 18px;
  letter-spacing: .4px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn-primary {
  background: var(--grape);
  color: #fff;
  box-shadow: 0 5px 0 var(--grape-deep), 0 10px 20px var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--grape-deep);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--grape-deep), 0 14px 24px var(--shadow);
}

.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--grape-deep); }

.btn-ghost {
  background: var(--paper);
  color: var(--cocoa);
  box-shadow: 0 4px 0 rgba(69, 38, 18, .18);
}

.btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(69, 38, 18, .18); }

.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- Hero --------------------------------------------------------- */

.hero {
  padding-block: 28px 44px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, #FFF0D4 0%, var(--cream) 60%);
}

.hero-art {
  max-width: 1140px;   /* fills the page container instead of sitting inset */
  margin-inline: auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px var(--shadow-soft);
}

/* The hero is a <video> now, so it needs the same sizing the global img rule
   gives images — without height:auto it ignores its own aspect ratio. */
.hero-art video,
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

/* Honour the OS "reduce motion" setting: hold the poster frame instead of
   looping a trailer at someone who has asked for less movement. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-art::after {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 2000 / 1164;
    background: url("images/hero.webp") center / cover no-repeat;
  }
}

.tagline {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: clamp(20px, 3.4vw, 30px);
  line-height: 1.3;
  color: var(--cocoa);
  margin: 30px auto 6px;
  max-width: 22ch;
  text-wrap: balance;
}

.tagline em { color: var(--grape); font-style: normal; }

.hero-sub {
  color: var(--cocoa-soft);
  max-width: 54ch;
  margin: 0 auto 26px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.steam-widget {
  max-width: 646px;
  margin-inline: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px var(--shadow-soft);
}

.steam-widget iframe {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
}

/* ---------- Section scaffolding ------------------------------------------ */

.section { padding-block: 62px; }

.section--peach {
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--peach) 100%);
}

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

.section-head h2 {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 6px;
  color: var(--cocoa);
}

/* The green swoosh from the wordmark, reused as the heading rule. */
.swoosh { display: block; width: 116px; height: 10px; margin: 0 auto; }
.swoosh path { fill: none; stroke: var(--leaf); stroke-width: 7; stroke-linecap: round; }

.lede {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
  font-size: 19px;
}

.lede strong { color: var(--grape); font-weight: 700; }

/* ---------- Screenshots + speech bubbles --------------------------------- */

.shots {
  display: grid;
  gap: 54px;
}

.shot-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 32px var(--shadow-soft);
  background: var(--paper);
}

/* Replica of the in-game speech bubble: dark name pill + cream paper body. */
.bubble {
  position: relative;
  max-width: 46ch;
  margin: 22px auto 0;
  background: var(--paper);
  border: 2px solid rgba(69, 38, 18, .14);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 5px 0 rgba(69, 38, 18, .08);
  text-align: center;
}

.bubble::after {
  content: "";
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 11px solid var(--paper);
}

.bubble-name {
  display: inline-block;
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 13px;
  letter-spacing: .6px;
  background: var(--cocoa);
  color: var(--cream);
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.bubble p { margin: 0; font-size: 17px; }

.shot-note {
  text-align: center;
  color: var(--cocoa-soft);
  font-size: 14px;
  margin-top: 10px;
}

/* ---------- Feature list ------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  max-width: 940px;
  margin-inline: auto;
}

.feature {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: 0 5px 0 rgba(69, 38, 18, .10);
}

.feature h3 {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 6px;
  color: var(--grape);
}

.feature p { margin: 0; font-size: 16px; color: var(--cocoa-soft); }

/* ---------- Studio ------------------------------------------------------- */

.studio { text-align: center; }

.studio-name {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: clamp(24px, 4vw, 34px);
  margin: 0 0 10px;
  color: var(--cocoa);
}

/* ---------- Socials ------------------------------------------------------ */

.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.social {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(69, 38, 18, .14);
  color: var(--cocoa);
  transition: transform .15s ease, color .15s ease;
}

.social:hover { transform: translateY(-3px); color: var(--grape); }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Footer ------------------------------------------------------- */

.footer {
  background: var(--cocoa);
  color: #F3E2CC;
  padding-block: 44px 34px;
  text-align: center;
}

.footer a { color: #F3E2CC; }
.footer .social { background: rgba(255, 255, 255, .10); box-shadow: none; color: #F3E2CC; }
.footer .social:hover { color: #fff; background: rgba(255, 255, 255, .20); }

.footer-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

.footer-note { font-size: 14px; opacity: .72; margin-top: 22px; }

.footer-mail {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 17px;
  text-decoration: none;
  display: inline-block;
  margin-top: 16px;
}

/* ---------- Contact form ------------------------------------------------- */

.page-head { padding-block: 46px 10px; text-align: center; }

.page-head h1 {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 6px;
  color: var(--cocoa);
}

.form-card {
  max-width: 640px;
  margin-inline: auto;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 6px 0 rgba(69, 38, 18, .10), 0 16px 34px var(--shadow-soft);
}

.field { display: grid; gap: 7px; margin-bottom: 20px; }

.field label {
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 15px;
  letter-spacing: .3px;
  color: var(--cocoa);
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--cocoa);
  background: #FFFDF7;
  border: 2px solid rgba(69, 38, 18, .18);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--grape);
  box-shadow: 0 0 0 4px rgba(91, 76, 199, .16);
}

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

.req { color: var(--grape); }

.form-note {
  font-size: 14px;
  color: var(--cocoa-soft);
  text-align: center;
  margin-top: 16px;
}

/* Spam honeypot — must stay visually hidden but present in the DOM. */
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.success {
  max-width: 640px;
  margin: 0 auto 26px;
  background: #E8F5E2;
  border: 2px solid var(--leaf);
  border-radius: var(--radius);
  padding: 18px 22px;
  text-align: center;
  color: #2E5C24;
}

.success strong {
  display: block;
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 19px;
  margin-bottom: 2px;
}

.error-banner {
  max-width: 640px;
  margin: 0 auto 26px;
  background: #FBE4E0;
  border: 2px solid #C0533F;
  border-radius: var(--radius);
  padding: 18px 22px;
  text-align: center;
  color: #7A2E1E;
}

.error-banner strong {
  display: block;
  font-family: "Poetsen One", "Nunito", sans-serif;
  font-size: 19px;
  margin-bottom: 2px;
}

.error-banner a { color: #7A2E1E; }

.contact-alt {
  text-align: center;
  margin-top: 28px;
  color: var(--cocoa-soft);
  font-size: 15px;
}

/* ---------- Motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn:hover, .social:hover { transform: none; }
}

@media (max-width: 560px) {
  .section { padding-block: 46px; }
  .shots { gap: 40px; }
  .nav-links a { font-size: 14px; }
  .nav-logo img { height: 28px; }
}
