/* ==========================================================================
   Stones Corner AI - Style Sheet
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --color-navy: #1a1a2e;
  --color-navy-light: #16213e;
  --color-dark: #0f0f1a;
  --color-white: #ffffff;
  --color-off-white: #f8f9fa;
  --color-gray-100: #f1f3f5;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #adb5bd;
  --color-gray-500: #6c757d;
  --color-gray-600: #495057;
  --color-gray-700: #343a40;
  --color-text: #2c2c3a;
  --color-text-light: #5a5a6e;
  --color-accent: #4a90a4;
  --color-accent-dark: #3a7a8e;
  --color-accent-light: #e8f4f8;
  --color-success: #2e7d5b;
  --color-error: #c0392b;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 50%;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  --max-width: 1140px;
  --nav-height: 72px;

  --transition: 0.3s ease;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Scroll Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  height: var(--nav-height);
  transition: box-shadow var(--transition);
}

.site-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1010;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 1001;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  margin-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 46, 0.7) 0%,
    rgba(15, 15, 26, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-weight: var(--font-weight-normal);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section--gray {
  background: var(--color-off-white);
}

.section--dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section--dark h2 {
  color: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ---------- MyCa Section (Home) ---------- */
.myca-section {
  text-align: center;
}

.myca-section .myca-logo {
  max-width: 220px;
  margin: 0 auto var(--space-lg);
}

.myca-section h2 {
  margin-bottom: var(--space-sm);
}

.myca-section .myca-text {
  max-width: 560px;
  margin: 0 auto;
  color: var(--color-text-light);
  font-size: 1.1rem;
}

.myca-section .btn {
  margin-top: var(--space-lg);
}

.myca-section .small-text {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* ---------- About / Split Section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split-image img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.split-text h2 {
  margin-bottom: var(--space-md);
}

.split-text p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .split--reverse .split-image {
    order: -1;
  }
}

/* ---------- Contact Form ---------- */
.contact-section {
  text-align: center;
}

.contact-section .section-header {
  margin-bottom: var(--space-xl);
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--color-error);
}

.form-message {
  margin-top: var(--space-sm);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  display: none;
}

.form-message.success {
  display: block;
  background: #e8f5e9;
  color: var(--color-success);
  border: 1px solid #c8e6c9;
}

.form-message.error {
  display: block;
  background: #fdecea;
  color: var(--color-error);
  border: 1px solid #f5c6cb;
}

.contact-form .btn {
  width: 100%;
  margin-top: var(--space-xs);
}

/* ---------- Team Cards ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  text-align: center;
}

.team-card img {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto var(--space-sm);
  box-shadow: var(--shadow-md);
}

.team-card h3 {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ---------- Feature Cards ---------- */
.features-image {
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.features-image img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--color-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--color-accent-dark);
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .features-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- MyCo Page Hero ---------- */
.page-hero {
  background: var(--color-navy);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  margin-top: var(--nav-height);
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.15rem;
  opacity: 0.9;
}

/* ---------- MyCa Page ---------- */
.myca-page {
  text-align: center;
  margin-top: var(--nav-height);
  padding: var(--space-2xl) var(--space-md);
  min-height: calc(100vh - var(--nav-height) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.myca-page-inner {
  max-width: 560px;
  margin: 0 auto;
}

.myca-page-inner .myca-logo {
  max-width: 240px;
  margin: 0 auto var(--space-lg);
}

.myca-page-inner h1 {
  margin-bottom: var(--space-sm);
}

.myca-page-inner .myca-text {
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.myca-page-inner .btn {
  margin-top: var(--space-lg);
}

.myca-page-inner .small-text {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--color-navy);
  color: var(--color-white);
  text-align: center;
}

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.9;
  font-size: 1.05rem;
}

.cta-section a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-section a:hover {
  color: var(--color-white);
}

/* ---------- About Page ---------- */
.about-intro {
  text-align: center;
}

.about-intro .team-photo-wrapper {
  margin: var(--space-lg) auto;
  max-width: 900px;
}

.about-intro .team-photo-wrapper img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.about-intro-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.05rem;
  color: var(--color-text-light);
}

.about-intro-text p {
  margin-bottom: 1rem;
}

.about-intro-text ul {
  margin-bottom: 1rem;
  padding-left: 0;
}

.about-intro-text ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-intro-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0.25rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
  color: var(--color-white);
}

/* ---------- Global Responsive ---------- */
@media (max-width: 768px) {
  .section {
    padding: var(--space-xl) 0;
  }

  .hero {
    min-height: 70vh;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
  }
}
