/*
 * Sage Foundry — application styles
 * Propshaft serves these directly; no preprocessor needed.
 */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* Color palette — earthy sage tones + warm accents */
  --color-bg:        #0c0f0e;
  --color-bg-alt:    #141918;
  --color-surface:   #1a2120;
  --color-surface-2: #223028;
  --color-border:    #2a3a32;
  --color-text:      #e8ede9;
  --color-text-muted:#8fa396;
  --color-sage:      #7bc48a;
  --color-sage-dark: #4a9e5c;
  --color-accent:    #f0c866;
  --color-accent-2:  #e07c5a;
  --color-accent-3:  #6baed6;
  --color-accent-4:  #c084d6;
  --color-white:     #ffffff;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}

a {
  color: var(--color-sage);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

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

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(12, 15, 14, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-brand .diamond {
  color: var(--color-sage);
  font-size: 1.2em;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

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

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 196, 138, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(240, 200, 102, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sage);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-lg);
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-brand {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-sage) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--color-text-muted);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-description {
  max-width: 600px;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-sage);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-sage-dark);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 196, 138, 0.25);
}

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

.btn-outline:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
  transform: translateY(-2px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: var(--space-xl);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-sage);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto var(--space-2xl);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ============================================
   PRODUCTS
   ============================================ */
.products {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-alt);
  position: relative;
}

.products::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: all 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.product-card:nth-child(1)::before { background: linear-gradient(90deg, var(--color-sage), var(--color-accent)); }
.product-card:nth-child(2)::before { background: linear-gradient(90deg, var(--color-accent-3), var(--color-sage)); }
.product-card:nth-child(3)::before { background: linear-gradient(90deg, var(--color-accent-2), var(--color-accent)); }
.product-card:nth-child(4)::before { background: linear-gradient(90deg, var(--color-accent-4), var(--color-accent-3)); }

.product-card:hover {
  border-color: var(--color-sage);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-card:hover::before {
  opacity: 1;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-icon svg {
  width: 32px;
  height: 32px;
}

.product-icon--1 { background: rgba(123, 196, 138, 0.12); color: var(--color-sage); }
.product-icon--2 { background: rgba(107, 174, 214, 0.12); color: var(--color-accent-3); }
.product-icon--3 { background: rgba(224, 124, 90, 0.12);  color: var(--color-accent-2); }
.product-icon--4 { background: rgba(192, 132, 214, 0.12); color: var(--color-accent-4); }

.product-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex-grow: 1;
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  width: fit-content;
}

.product-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.product-status--building {
  background: rgba(240, 200, 102, 0.1);
  color: var(--color-accent);
}

.product-status--building::before {
  background: var(--color-accent);
}

.product-status--live {
  background: rgba(123, 196, 138, 0.1);
  color: var(--color-sage);
}

.product-status--live::before {
  background: var(--color-sage);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: var(--space-3xl) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.about-content .section-title {
  text-align: left;
}

.about-content p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.value-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease);
}

.value-card:hover {
  border-color: var(--color-sage);
}

.value-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--color-sage);
}

.value-icon svg {
  width: 100%;
  height: 100%;
}

.value-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.value-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   CTA
   ============================================ */
.cta {
  padding: var(--space-3xl) 0;
  text-align: center;
  background: var(--color-bg-alt);
  position: relative;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta p {
  max-width: 550px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-domain {
  font-family: var(--font-mono);
  color: var(--color-sage);
  font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding-top: var(--space-2xl);
    min-height: auto;
    padding-bottom: var(--space-xl);
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .value-card {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-brand {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   CONTACT FORM
   ============================================ */
.cta-intro {
  max-width: 550px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.form-input {
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.form-input:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(123, 196, 138, 0.15);
}

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

.form-actions {
  display: flex;
  justify-content: center;
}

.btn-submit {
  min-width: 200px;
  font-size: 1rem;
  padding: 1rem 2.5rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .btn-submit {
    width: 100%;
  }
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 500px;
  width: calc(100% - 2rem);
  animation: flash-in 0.35s var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.flash--notice {
  background: rgba(123, 196, 138, 0.15);
  border: 1px solid var(--color-sage);
  color: var(--color-sage);
}

.flash--alert {
  background: rgba(224, 124, 90, 0.15);
  border: 1px solid var(--color-accent-2);
  color: var(--color-accent-2);
}

.flash p {
  flex: 1;
  margin: 0;
}

.flash-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.flash-close:hover {
  opacity: 1;
}

.flash--hiding {
  animation: flash-out 0.3s var(--ease) forwards;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes flash-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}

