/* Ashthil Games: studio site. Phones first, then wider layouts. */

@font-face {
  font-family: "Audiowide";
  src: url("../fonts/Audiowide-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #F5F6FA;
  --ink: #111111;
  --accent: #4C1D95;
  --accent-soft: #ECE6F7;
  --muted: #4B5060;
  --line: #E1E3EC;
  --card: #FFFFFF;
  --radius: 18px;
  --wrap: 1080px;
  --display: "Audiowide", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Gravity Chef's own look, for its card */
  --gc-cream: #FFFAF0;
  --gc-cream-2: #FFF3DC;
  --gc-orange: #FF8A3D;
  --gc-green: #4CB944;
  --gc-ink: #3B2A20;
  --gc-wood: #B5784C;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 4.4vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- Wordmark: ASHTHIL(TM) over G A M E S, both the same width ---------- */
.wordmark {
  --fs: 40px;
  display: inline-flex;
  flex-direction: column;
  font-family: var(--display);
  color: var(--ink);
  line-height: 1;
}
.wm-name { position: relative; font-size: var(--fs); line-height: .8; }
.wm-name .tm { position: absolute; left: calc(100% + .05em); top: .02em; font-size: .2em; line-height: 1; }
.wm-games {
  display: flex;
  justify-content: space-between;
  font-size: calc(var(--fs) * .32);
  line-height: .8;
  margin-top: calc(var(--fs) * .28);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 250, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; }
.brand .wordmark { --fs: 19px; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 10px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 420px) {
  .brand .wordmark { display: none; }
}

/* ---------- Buttons and pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(76, 29, 149, .25); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: var(--accent-soft); color: var(--accent);
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- Home hero ---------- */
/* A deep-purple panel: big headline on the left, a live "stage" on the right where
   the Gravity Chef phone tilts like the game's twisting kitchen. Stacks on phones. */
.hero { padding: 16px 0 8px; }
.hero-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 85% 20%, #7C3AED 0%, rgba(124, 58, 237, 0) 55%),
    radial-gradient(90% 80% at 0% 100%, #2E1065 0%, rgba(46, 16, 101, 0) 60%),
    linear-gradient(160deg, #5B21B6 0%, #4C1D95 45%, #2E1065 100%);
  padding: 36px 20px 0;
  display: grid;
  gap: 8px;
  box-shadow: 0 24px 60px rgba(46, 16, 101, .35);
}
.hero-bg { position: absolute; width: 0; height: 0; }

.hex-field { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx { position: absolute; fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 2.4; animation: drift 14s ease-in-out infinite alternate; }
.hx-solid { fill: rgba(255, 255, 255, .06); stroke: none; }
.hx1 { width: 160px; left: -40px; top: 24px; animation-duration: 16s; }
.hx2 { width: 70px; left: 44%; top: 18px; animation-duration: 11s; animation-delay: -4s; }
.hx3 { width: 260px; right: -70px; bottom: -60px; animation-duration: 19s; }
.hx4 { width: 120px; left: 30%; bottom: 10%; animation-duration: 13s; animation-delay: -6s; }
.hx5 { width: 46px; right: 8%; top: 12%; animation-duration: 9s; animation-delay: -2s; }
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(14px, -22px) rotate(24deg); }
}

.hero-copy { position: relative; }
.hero-kicker {
  display: inline-block; margin: 0 0 16px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  font: .8rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase;
}
@media (max-width: 380px) { .hero-kicker { font-size: .7rem; letter-spacing: .1em; } }
.hero-title {
  font-size: clamp(3rem, 14vw, 5.6rem);
  line-height: 1.02;
  margin: 0 0 18px;
  color: #fff;
  text-wrap: balance;
}
.hero-title span {
  background: linear-gradient(90deg, #DDD6FE 0%, #FFB27A 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-line { max-width: 40ch; margin: 0 0 26px; font-size: 1.12rem; color: rgba(255, 255, 255, .86); }
.btn-light { background: #fff; border-color: #fff; color: var(--accent); }
.btn-light:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.hero .btn { padding-inline: 16px; font-size: .95rem; }
.hero .btn-row { gap: 10px; }
@media (min-width: 900px) { .hero .btn { padding-inline: 22px; font-size: 1rem; } }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); box-shadow: none; }

.hero-stage { position: relative; height: 400px; margin-top: 12px; }
.stage-glow {
  position: absolute; left: 50%; top: 55%; width: 340px; height: 340px; translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 178, 122, .45) 0%, rgba(255, 178, 122, 0) 65%);
}
.phone {
  position: absolute; left: 50%; bottom: -70px; width: 210px; margin-left: -70px;
  border-radius: 34px; padding: 9px;
  background: #160831;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 30px 60px rgba(10, 3, 25, .55);
  transform-origin: 50% 70%;
  animation: tilt 7s ease-in-out infinite;
}
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 540 / 881; object-fit: cover; }
@keyframes tilt {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(5deg); }
}
.stage-chef {
  position: absolute; left: 50%; bottom: 0; width: 190px; margin-left: -190px;
  filter: drop-shadow(0 14px 18px rgba(10, 3, 25, .45));
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}
.stage-sticker {
  position: absolute; right: 4px; top: 14px; white-space: nowrap;
  display: grid; gap: 2px;
  padding: 12px 18px 13px; border-radius: 18px;
  background: var(--gc-cream); color: var(--gc-ink);
  border: 3px solid var(--gc-orange);
  box-shadow: 0 6px 0 #C9601F, 0 16px 30px rgba(10, 3, 25, .35);
  transform: rotate(6deg);
}
.sticker-top { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #C9601F; }
.sticker-name { font: 1.25rem/1.1 var(--display); }
.sticker-sub { font-size: .78rem; font-weight: 700; opacity: .8; }

@media (min-width: 900px) {
  .hero { padding-top: 24px; }
  .hero-title { font-size: clamp(4rem, 6.6vw, 5.4rem); }
  .hero-panel { grid-template-columns: 1.25fr 1fr; align-items: center; padding: 0 0 0 56px; min-height: 560px; }
  .hero-copy { padding: 64px 0; }
  .hero-stage { height: 560px; margin: 0; }
  .phone { width: 250px; bottom: -40px; margin-left: -80px; }
  .stage-chef { width: 230px; margin-left: -230px; bottom: 20px; }
  .stage-sticker { top: 56px; right: 28px; }
  .stage-glow { width: 460px; height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  .hx, .phone, .stage-chef { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { margin-bottom: 22px; }
.eyebrow { font-family: var(--display); color: var(--accent); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.page-head { padding: 48px 0 8px; }
.prose { max-width: 66ch; }
.prose h2 { margin-top: 1.6em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Gravity Chef card (in the game's own colours) ---------- */
.gc {
  background: linear-gradient(180deg, var(--gc-cream), var(--gc-cream-2));
  color: var(--gc-ink);
  border: 3px solid var(--gc-wood);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 0 rgba(181, 120, 76, .25), 0 18px 40px rgba(59, 42, 32, .12);
}
.gc-art { position: relative; background: var(--gc-cream-2); }
.gc-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gc-body { padding: 22px 22px 26px; display: grid; gap: 14px; }
.gc-logo { width: min(260px, 70%); margin-top: -96px; position: relative; filter: drop-shadow(0 6px 10px rgba(59, 42, 32, .2)); }
.gc h2, .gc h3 { color: var(--gc-ink); }
.gc p { margin: 0; }
.gc a:not(.btn) { color: #B5520F; }
.gc .btn { background: var(--gc-orange); border-color: var(--gc-orange); color: #2A1A10; box-shadow: 0 4px 0 #C9601F; }
.gc .btn:hover { box-shadow: 0 6px 0 #C9601F, 0 8px 18px rgba(255, 138, 61, .35); }
.gc .btn-ghost { background: #fff; border-color: var(--gc-wood); color: var(--gc-ink); box-shadow: 0 4px 0 rgba(181, 120, 76, .45); }
.gc .pill { background: #fff; color: var(--gc-ink); border: 2px solid var(--gc-green); }
.gc .pill::before { background: var(--gc-green); }
.gc-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-tag { font-size: .85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(181, 120, 76, .14); }
@media (min-width: 860px) {
  .gc-feature { display: grid; grid-template-columns: 1.4fr 1fr; align-items: stretch; }
  .gc-feature .gc-art img { height: 100%; aspect-ratio: auto; object-position: 70% center; }
  .gc-feature .gc-body { padding: 34px; align-content: center; }
  .gc-feature .gc-logo { margin-top: 0; }
}

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 14px; margin: 0;
  list-style: none;
}
.shots li { scroll-snap-align: start; }
.shots img { border-radius: 18px; border: 3px solid var(--gc-wood); aspect-ratio: 540 / 881; object-fit: cover; width: 100%; }
@media (min-width: 760px) { .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; } }

.cast { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 760px) { .cast { grid-template-columns: repeat(4, 1fr); } }
.cast li { background: #fff; border: 2px solid rgba(181, 120, 76, .35); border-radius: 20px; padding: 14px 12px 12px; text-align: center; }
.cast img { height: 150px; width: auto; margin: 0 auto 8px; object-fit: contain; }
.cast strong { display: block; }
.cast span { font-size: .9rem; opacity: .8; }

.feature-list { margin: 0; padding-left: 1.2em; }
.feature-list li { margin-bottom: .35em; }

/* ---------- Contact ---------- */
.contact-email { font-weight: 700; font-size: clamp(1.1rem, 5vw, 1.5rem); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 40px; font-size: .92rem; color: var(--muted); margin-top: 40px; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand .wordmark { --fs: 17px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.footer-nav a { color: var(--ink); font-weight: 600; text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-nav a:hover { color: var(--accent); }
.legal p { margin: 0 0 .3em; }
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; }
  .footer-nav ul { justify-content: flex-end; }
  .legal { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 72px 0 40px; }
.not-found img { width: 150px; margin: 0 auto 18px; transform: rotate(-14deg); }
.not-found .btn-row { justify-content: center; }

/* ---------- Intro: the splash screen, once per visit ----------
   Timeline (seconds), as in the game's splash:
   0.00  the hexagon lands with a squash (0.55)
   0.55  the ring fills like a loading bar (1.6)
   1.51  the name fades in and rises (0.5)
   2.15  hold, still (1.0)
   3.15  crossfade into the page (0.6)                                     */
.intro { display: none; }
.intro-on body { overflow: hidden; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 6vh;
  background: var(--bg);
  cursor: pointer;
  animation: intro-out .6s ease-in-out 3.15s forwards;
}
.intro { --mark: min(62vw, 36vh); }
.intro .mark { width: var(--mark); height: var(--mark); overflow: visible; }
.intro .wordmark { --fs: calc(var(--mark) * .26); margin-top: calc(var(--mark) * .04); }
@media (min-aspect-ratio: 1/1) {
  .intro { --mark: min(46vh, 30vw); }
  .intro-on .intro { flex-direction: row; padding-bottom: 0; }
  .intro .wordmark { --fs: calc(var(--mark) * .3); margin: 0 0 0 calc(var(--mark) * .06); }
}
.intro-on .intro .hex-group {
  transform-box: view-box; transform-origin: 60px 60px;
  animation: hex-in .55s cubic-bezier(.34, 1.56, .64, 1) both, fade-in .45s linear both;
}
.intro-on .intro .ring {
  stroke-dasharray: 0 2;
  opacity: 0;
  animation: ring-fill 1.6s cubic-bezier(.65, 0, .35, 1) .55s forwards;
}
.intro-on .intro .wordmark { animation: name-in .5s cubic-bezier(.5, 1, .89, 1) 1.51s both; }

.intro-skip .intro .hex-group,
.intro-skip .intro .ring,
.intro-skip .intro .wordmark { animation: none !important; }
.intro-skip .intro .ring { stroke-dasharray: .84 2; opacity: 1; }
.intro-skip.intro-on .intro { animation: intro-out .4s ease-in-out forwards; }

@keyframes hex-in {
  0%   { transform: scale(.86); }
  55%  { transform: scale(1.06, .95); }
  80%  { transform: scale(.98, 1.02); }
  100% { transform: scale(1); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ring-fill { from { stroke-dasharray: 0 2; opacity: 1; } to { stroke-dasharray: .84 2; opacity: 1; } }
@keyframes name-in { from { opacity: 0; transform: translateY(calc(var(--mark) * .1)); } to { opacity: 1; transform: none; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

.card h2 { font-size: 1.2rem; }
.card > :last-child { margin-bottom: 0; }
@media (min-width: 760px) { .gc:not(.gc-feature) .gc-art img { aspect-ratio: 16 / 7; object-position: center 40%; } }
