/* Cresvo Games site. Fonts are self-hosted so visitors are not sent to third-party font servers. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Cresvo brand palette (cresvo-logo/KULLANIM.md) */
  --navy: #13224A;
  --navy-stripe: #16264F;
  --navy-raised: #1E3465;
  --coral: #FF5A4E;
  --coral-text: #D93A30;  /* small coral type on white */
  --paper: #FFFFFF;

  --ink: #13224A;
  --ink-soft: #4A5670;
  --tint: #F1F3F8;
  --rule: #D8DDE8;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: currentColor; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--coral);
  color: var(--navy);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- top bar ---------- */

.bar {
  background: var(--navy);
  color: var(--paper);
}
.bar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
/* The wordmark is the brand SVG (white type, coral dot) on the navy bar.
   Padding keeps the clear space the brand guide asks for. */
.wordmark {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  text-decoration: none;
  line-height: 0;
}
.wordmark img {
  width: auto;
  height: 1.75rem;
}
@media (max-width: 26rem) {
  .wordmark img { height: 1.5rem; }
}
.bar nav {
  display: flex;
  gap: 1.25rem;
  font-weight: 600;
  font-size: 0.975rem;
}
.bar nav a { text-decoration-color: transparent; }
.bar nav a:hover,
.bar nav a[aria-current="page"] { text-decoration-color: var(--coral); }

/* ---------- home: pitch hero ---------- */

.pitch {
  position: relative;
  color: var(--paper);
  background:
    repeating-linear-gradient(
      90deg,
      var(--navy) 0 12.5%,
      var(--navy-stripe) 12.5% 25%
    );
  overflow: hidden;
}
.pitch-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(2.5rem, 7vw, 5rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.field {
  width: 100%;
  height: auto;
}
.field .chalk {
  fill: none;
  stroke: var(--paper);
  stroke-width: 3;
  opacity: 0.9;
}
.field .shot {
  fill: none;
  stroke: var(--paper);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
  opacity: 0.5;
}
.field .shot-goal {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
}
.field .blocker { fill: var(--navy-raised); stroke: var(--paper); stroke-width: 3; }
.field .miss { stroke: var(--paper); stroke-width: 4; stroke-linecap: round; opacity: 0.8; }
.field .ball { fill: var(--paper); stroke: var(--navy); stroke-width: 3; }
.field .net { stroke: var(--paper); stroke-width: 1.5; opacity: 0.45; }

/* The one motion moment: the winning shot draws in once (a mask grows along the arc). */
.field .reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .field .reveal { animation: draw 1.5s 0.35s cubic-bezier(0.3, 0.6, 0.2, 1) both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}

@media (min-width: 60rem) {
  .pitch-inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: end;
  }
  .pitch-inner .hero-copy { order: -1; }
}

.hero-copy { max-width: 40rem; }
.hero-copy h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.hero-copy p {
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.45;
  margin: 0;
  max-width: 34ch;
}

/* ---------- home: game ---------- */

.game {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 52rem) {
  .game { grid-template-columns: 1.1fr 1fr; align-items: start; }
}
.game h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 0.95;
  margin: 0 0 1rem;
}
.game .lede {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  max-width: 38ch;
}
.status {
  display: inline-block;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--coral);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--coral-text);  /* small coral type on white */
}

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.rules li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.rules .k {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
}
.rules p { margin: 0; color: var(--ink-soft); }

/* ---------- document pages ---------- */

.doc {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) var(--gutter) 4rem;
}
.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  line-height: 0.95;
  margin: 0 0 0.75rem;
}
.doc .updated {
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 2.75rem 0 0.75rem;
}
.doc h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
}
.doc p, .doc ul { margin: 0 0 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc .summary {
  background: var(--tint);
  border-left: 6px solid var(--coral);
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}
.doc .summary p:last-child { margin-bottom: 0; }

.contact-line {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.1;
  margin: 0.5rem 0 1.5rem;
  word-break: break-word;
}

/* ---------- footer ---------- */

.foot {
  background: var(--navy);
  color: var(--paper);
}
.foot-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: 0.95rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot p { margin: 0; opacity: 0.8; }
