/* =========================================================
   GRAYYA — Home page styles
   Palette + type from the GRAYYA brand guide (brandmark.io):
   Purple #7F42F6 · Blue #0597F2 · Charcoal #474653 · White
   Headings: Oswald (condensed, caps) · Body: Inter
   ========================================================= */
:root {
  --red:     #D4504A;   /* "G" — warm start of gradient   */
  --pink:    #E7569D;   /* puzzle top-left                 */
  --magenta: #C9508A;   /* "R"                              */
  --purple:  #8645F1;   /* puzzle bottom-left              */
  --violet:  #A367D8;   /* "AY"                             */
  --indigo:  #7A7FEB;   /* "YA"                             */
  --blue:    #487AF3;   /* puzzle bottom-right             */
  --sky:     #4A9BEA;   /* end of wordmark                 */

  --grad: linear-gradient(90deg, var(--red) 0%, var(--magenta) 25%, var(--violet) 55%, var(--indigo) 75%, var(--sky) 100%);
  --grad-diag: linear-gradient(120deg, var(--pink) 0%, var(--purple) 50%, var(--blue) 100%);

  --brand-purple: #7F42F6;
  --brand-blue:   #0597F2;
  --charcoal:     #474653;
  --purple-dark:  #6A2FE0;

  --ink:    #2E2D38;    /* headings (deepened charcoal) */
  --text:   #474653;    /* body = brand charcoal */
  --muted:  #6A6977;
  --line:   #ECEAF3;
  --tint:   #F8F7FC;
  --bg:     #FFFFFF;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(22,20,43,.04), 0 8px 24px rgba(22,20,43,.06);
  --shadow-lg: 0 10px 24px -8px rgba(127,66,246,.28);
  --ff-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--ff-head); color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: .01em; font-weight: 500; }
h1, h2 { text-transform: uppercase; font-weight: 700; line-height: 1.05; }
h2 { color: var(--brand-purple); }
p { margin: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 14px;
}
.grad-text { color: var(--brand-purple); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-purple); color: #fff; box-shadow: 0 10px 24px -10px rgba(127,66,246,.6); }
.btn-primary:hover { background: var(--purple-dark); box-shadow: 0 14px 30px -10px rgba(127,66,246,.7); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.btn-light { background: #fff; color: var(--brand-purple); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 10px 20px; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { width: 150px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a:not(.btn) {
  font-weight: 500; font-size: .95rem; color: var(--text);
  position: relative; padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--brand-purple); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--brand-purple); }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 72px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 4.8rem); margin-bottom: 22px; }
.lead { font-size: 1.15rem; max-width: 34rem; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Puzzle visual */
.puzzle {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: 100%; max-width: 440px; aspect-ratio: 1; margin-left: auto;
}
.tile {
  position: relative; border-radius: 26px; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; z-index: 1;
  transition: transform .35s ease;
}
.puzzle:hover .t-white { transform: translate(6px,-6px) rotate(3deg); }
.tile-num { font-family: var(--ff-head); font-size: .85rem; opacity: .8; }
.tile-label { font-family: var(--ff-head); font-weight: 600; font-size: clamp(1rem, 2vw, 1.25rem); }
.t-pink   { background: linear-gradient(145deg, #F06AAA, var(--pink)); border-top-left-radius: 34px; }
.t-purple { background: linear-gradient(145deg, #9563F8, var(--brand-purple)); border-bottom-left-radius: 34px; }
.t-blue   { background: linear-gradient(145deg, #2FA8F5, var(--brand-blue)); border-bottom-right-radius: 34px; }
.t-white  {
  background: #fff; color: var(--ink);
  border: 2.5px dashed #2A2840; border-top-right-radius: 34px;
  animation: float 5s ease-in-out infinite;
}
.t-white .tile-label { color: var(--brand-purple); }
.knob {
  position: absolute; left: -16px; top: 50%; width: 30px; height: 30px; margin-top: -15px;
  background: #fff; border: 2.5px dashed #2A2840; border-radius: 50%;
  clip-path: inset(0 50% 0 0);
}
@keyframes float {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(4px,-6px); }
}


/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-band { background: var(--brand-blue); color: #fff; }
.section-band h2 { color: #fff; }
.section-band .eyebrow { color: rgba(255,255,255,.85); }
.section-band .section-head p:not(.eyebrow) { color: rgba(255,255,255,.9); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2, .why-copy h2 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); margin-bottom: 14px; }
.section-head p:not(.eyebrow) { font-size: 1.08rem; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px;
  background: var(--brand-purple); border-radius: 0 0 3px 3px; opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.35rem; margin: 20px 0 10px; }
.card p { font-size: .97rem; }
.icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
}
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-red, .i-purple, .i-indigo { color: var(--brand-purple); background: #F1EAFE; }
.i-pink, .i-violet, .i-blue     { color: var(--brand-blue);   background: #E6F4FE; }

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  counter-reset: none;
}
.step {
  background: #fff; border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--c);
  color: var(--text);
}
.step-num { font-family: var(--ff-head); font-weight: 700; font-size: 2.6rem; color: var(--c); line-height: 1; }
.step h3 { font-size: 1.4rem; text-transform: uppercase; margin: 18px 0 8px; }
.step p { font-size: .96rem; }

/* Why */
.why-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 72px; align-items: center; }
.why-copy p:not(.eyebrow) { font-size: 1.08rem; margin-bottom: 30px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.why-list li {
  display: flex; gap: 16px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.dot { flex: none; width: 14px; height: 14px; margin-top: 6px; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 15%, transparent); }
.why-list h3 { font-size: 1.25rem; margin-bottom: 6px; }
.why-list p { font-size: .94rem; }

/* CTA */
.cta-section { padding-top: 20px; }
.cta {
  position: relative; overflow: hidden;
  background: var(--brand-purple); color: #fff; text-align: center;
  border-radius: 32px; padding: 72px 32px;
}
.cta::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px;
  border-radius: 80px; border: 2px solid rgba(255,255,255,.25); transform: rotate(20deg);
}
.cta h2 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 14px; }
.cta p { max-width: 520px; margin: 0 auto 32px; font-size: 1.1rem; opacity: .95; }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 140px; height: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 320px; color: var(--muted); }
.site-footer h4 { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.footer-grid a:hover { color: var(--brand-purple); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .88rem;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Blogs ---------- */
.page-hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); margin-bottom: 14px; }
.page-hero p:not(.eyebrow) { font-size: 1.1rem; max-width: 40rem; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; }
.post-card .post-meta { margin-top: auto; padding-top: 18px; font-size: .85rem; color: var(--muted); }
.post-card a.card-link::after { content: ""; position: absolute; inset: 0; }
.post-card h3 a:hover { color: var(--brand-purple); }
.empty-state {
  text-align: center; padding: 64px 24px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.empty-state h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.empty-state p { margin-bottom: 26px; }
.article { max-width: 760px; margin: 0 auto; }
.article .back-link { display: table; margin-bottom: 28px; font-weight: 500; color: var(--brand-purple); }
.article h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 16px; }
.article .post-meta { color: var(--muted); font-size: .92rem; margin-bottom: 40px; }
.article-body { font-size: 1.08rem; line-height: 1.8; }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { font-size: 1.8rem; margin-top: 1.8em; }
.article-body h3 { font-size: 1.35rem; margin-top: 1.5em; }
.article-body a { color: var(--brand-purple); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand-purple); font-style: italic; }
.article-body img { border-radius: var(--radius); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px;
    box-shadow: 0 20px 30px -20px rgba(22,20,43,.2);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 18px; }

  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .puzzle { margin: 0 auto; max-width: 360px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .brand img { width: 128px; }
  .cards, .steps, .why-list, .post-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 36px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .lead { font-size: 1.05rem; }
  .tile { padding: 16px; border-radius: 20px; }
  .cta { padding: 52px 22px; border-radius: 24px; }
  .cta-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .t-white { animation: none; }
  .btn, .card, .tile { transition: none; }
}
