/*
=================================================
Gita.zat.am Global Styles
=================================================
*/

:root {

  /* Brand palette */
  --navy: #0b2b4f;
  --navy-dark: #09264a;
  --navy-light: #143d6b;

  --gold: #f6b23b;
  --gold-light: #ffd36b;

  --cream: #fffaf2;
  --cream-dark: #fff7e8;
  --white: #ffffff;
  --border: #eadfce;
  
  --muted: #687789;
  --success: #2f855a;
  --success-soft: #eef9f2;
  --danger: #c2413b;
  --danger-soft: #fff1ef;
  --accent-coral: #f16945;
  --accent-blue: #2f6dff;

  --text: var(--navy-dark);

  /* Typography */
  --font-size-xs: 0.6rem;
  --font-size-sm: 0.75rem;
  --font-size-base: 0.85rem;
  --font-size-body: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-display: clamp(2.5rem, 7vw, 5rem);
  --font-size-verse: clamp(1.2rem, 2vw, 1.6rem);

  --zatam-font: Arial, Helvetica, sans-serif;
  --zatam-content-width: 1100px;

  /* Surfaces and shape */
  --control-height-sm: 40px;
  --control-height-md: 42px;

  --shadow-sm: 0 3px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 18px rgba(11, 43, 79, 0.14);
  --shadow-lg: 0 14px 28px rgba(11, 43, 79, 0.18);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --radius-circle: 50%;
  --transition: 0.2s ease;

  /* Shared controls */
  --button-height-sm: 40px;
  --button-height-md: 44px;
  --button-height-lg: 46px;
  --button-padding-primary: 0 20px;
  --button-padding-compact: 0 16px;
  --button-radius: var(--radius-sm);

}

/* Base document layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--zatam-font);
  font-size: var(--font-size-body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Common content spacing and typography */
h1,h2,h3,h4,h5,h6,p,figure,blockquote {
  margin: 0;
}

h1,h2,h3,h4,h5,h6 {
  color: var(--navy-dark);
  font-family: var(--zatam-font);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.65rem, 4vw, 2.25rem); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  line-height: 1.65;
}

img,picture,video,canvas,svg {
  max-width: 100%;
}

img,video {
  height: auto;
}

/* Links and controls */
a {
  color: var(--navy-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy-dark);
}

button,input,select,textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 3px;
}

::selection {
  background: var(--gold-light);
  color: var(--navy-dark);
}

/* Game catalog layout and cards */
.menu {
  padding: 3rem 0 5rem;
  background: var(--cream);
}

.section-center {
  width: min(70rem, calc(100% - 3rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 20rem));
  justify-content: center;
  align-items: stretch;
  gap: 2.125rem 3.625rem;
}

.menu-item {
  width: 20rem;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.menu-item:hover {
  transform: translateY(-0.5rem) rotate(-0.3deg);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
}

.game-image-link {
  display: block;
  overflow: hidden;
}

.game-image-wrapper {
  height: 9.7rem;
  position: relative;
  overflow: hidden;
  background: var(--cream-dark);
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  transition: transform var(--transition);
}

.menu-item:hover .photo {
  transform: scale(1.035);
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.125rem 1.125rem;
}

.game-title {
  margin: 0 0 0.55rem;
  color: var(--navy-dark);
  font-family: var(--zatam-font);
  font-size: var(--font-size-lg);
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
}

.game-title a {
  color: var(--navy-dark);
  font-weight: 800;
}

.game-title a:hover {
  color: var(--accent-blue);
}

.item-text {
  flex: 1;
  margin: 0 0 1.125rem;
  color: var(--muted);
  font-size: var(--font-size-base);
  line-height: 1.45;
}

.item-text pre {
  display: inline;
  margin: 0;
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
  white-space: normal;
}

.game-card-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.play-btn {
  min-height: 2.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  background: var(--navy);
  color: var(--white) !important;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-xs);
  font-size: var(--font-size-sm);
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.play-btn:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 950px) {
  .section-center { gap: 1.75rem; }
}

@media (max-width: 760px) {
  .menu { padding-top: 2.25rem; }
  .section-center {
    width: calc(100% - 1.875rem);
    grid-template-columns: minmax(0, 22.5rem);
    gap: 1.5rem;
  }
  .menu-item { width: 100%; max-width: 22.5rem; }
  .game-image-wrapper { height: 11.25rem; }
}

@media (max-width: 420px) {
  .section-center { width: calc(100% - 1.5rem); }
  .game-image-wrapper { height: 10.3rem; }
}

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