/*
Theme Name: WP AI Block
Theme URI: https://github.com/your-org/wp-ai-subscription
Author: WP AI Subscription
Author URI: https://yourdomain.com
Description: A controllable block theme (FSE) whose homepage renders AI-injected post meta (hero/about/services/contact) and the primary_color theme mod. Ships per-template style variations. See THEME-CONTRACT.md.
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.0
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wpai-block
*/

:root {
  --wpai-primary: #2563eb; /* overridden inline from the primary_color theme mod */
}

/* The homepage consumes theme.json presets so /styles/*.json variations restyle it.
   Each var has a hard fallback for safety. */
.wpai-container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Hero */
.wpai-hero {
  padding-block: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--wpai-primary) 8%, var(--wp--preset--color--base, #fff)),
    var(--wp--preset--color--base, #fff)
  );
  text-align: center;
}
.wpai-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.wpai-hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--wp--preset--color--muted, #475569);
  max-width: 42rem;
  margin: 0 auto 2rem;
}

/* Buttons */
.wpai-btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 0.6rem;
  background: var(--wpai-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.wpai-btn:hover { filter: brightness(0.92); }

/* Sections */
.wpai-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.wpai-section--surface { background: var(--wp--preset--color--surface, #f8fafc); }
.wpai-section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  text-align: center;
  margin: 0 0 0.75rem;
}
.wpai-section__subtitle {
  text-align: center;
  color: var(--wp--preset--color--muted, #64748b);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}
.wpai-about__content {
  max-width: 46rem;
  margin-inline: auto;
  color: var(--wp--preset--color--contrast, #334155);
  line-height: 1.8;
  font-size: 1.075rem;
}

/* Services grid */
.wpai-services {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.wpai-card {
  background: var(--wp--preset--color--base, #fff);
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #0f172a) 12%, transparent);
  border-radius: 0.9rem;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.wpai-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--wpai-primary) 12%, var(--wp--preset--color--base, #fff));
  color: var(--wpai-primary);
  margin-bottom: 1rem;
}
.wpai-card__icon svg { width: 1.4rem; height: 1.4rem; }
.wpai-card__title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.wpai-card__desc { color: var(--wp--preset--color--muted, #64748b); margin: 0; line-height: 1.6; }

/* Contact */
.wpai-contact { text-align: center; }
.wpai-contact .wpai-btn { margin-top: 1.5rem; }
