/* ============================================================
   HAFA ADAI AI — style.css
   Tropical gradient theme
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Open+Sans:wght@400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --color-ocean:   #0c1445;
  --color-sunset:  #ff6b35;
  --color-coral:   #ff4757;
  --color-teal:    #00b4d8;
  --color-sand:    #ffeaa7;
  --color-light:   #f5f7ff;
  --color-white:   #ffffff;
  --color-text:    #1a1f3a;
  --color-muted:   #5a6070;

  --gradient-hero: linear-gradient(135deg, var(--color-ocean) 0%, #1a2a6c 40%, var(--color-sunset) 100%);
  --gradient-btn:  linear-gradient(135deg, var(--color-sunset) 0%, var(--color-coral) 100%);
  --gradient-card-glass: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);

  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body:    'Open Sans', system-ui, -apple-system, sans-serif;

  --radius-card:  16px;
  --radius-btn:   50px;
  --radius-input: 10px;

  --shadow-card:  0 4px 24px rgba(12, 20, 69, 0.10);
  --shadow-hover: 0 12px 40px rgba(12, 20, 69, 0.18);
  --shadow-btn:   0 4px 20px rgba(255, 107, 53, 0.40);

  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Wave dividers ── */
.wave-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  width: 100%;
  height: 80px;
  display: block;
}

.wave-bottom {
  margin-top: auto;
}

/* ── Section headings ── */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.25rem;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: var(--color-white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 53, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Subtle tropical texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 107, 53, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

/* CSS-only palm silhouette motif (top-right corner) */
.hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 320px;
  height: 400px;
  background-image:
    radial-gradient(ellipse 60px 20px at 50% 85%, rgba(0, 180, 216, 0.12) 0%, transparent 100%),
    radial-gradient(ellipse 80px 25px at 30% 75%, rgba(0, 180, 216, 0.08) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0.6;
}

/* ── Nav ── */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.25rem;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition);
}

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

/* ── Hero content ── */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem 6rem;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 500;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  position: relative;
  background: var(--color-white);
  padding: 5rem 0 0;
}

.features .container {
  padding-bottom: 4rem;
}

.features .section-title,
.features .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ── Cards (shared) ── */
.card {
  background: var(--color-white);
  border: 1px solid rgba(12, 20, 69, 0.08);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 52px;
  height: 52px;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-ocean);
  margin-bottom: 0.65rem;
}

.card p {
  color: var(--color-muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  position: relative;
  background: var(--color-ocean);
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 1.25rem;
}

.about-text .section-title {
  color: var(--color-white);
}

.about-text p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text p em {
  color: var(--color-sand);
  font-style: normal;
  font-weight: 600;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.island-graphic {
  width: 100%;
  max-width: 280px;
  opacity: 0.9;
  filter: drop-shadow(0 8px 24px rgba(0, 180, 216, 0.3));
  animation: floatIsland 6s ease-in-out infinite;
}

@keyframes floatIsland {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products {
  position: relative;
  background: var(--color-light);
  padding: 5rem 0 0;
}

.products .container {
  padding-bottom: 4rem;
}

.products .section-title,
.products .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Product card — extends base .card */
.card-product {
  display: block;
  cursor: pointer;
  background: var(--color-white);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.card-product::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-btn);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-card);
}

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

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-sunset);
  transition: color var(--transition), letter-spacing var(--transition);
}

.card-product:hover .card-link {
  color: var(--color-coral);
  letter-spacing: 0.02em;
}

/* ============================================================
   CTA / CONTACT
   ============================================================ */
.cta {
  position: relative;
  background: var(--color-ocean);
  padding: 0 0 5rem;
}

.cta .container {
  padding-top: 4rem;
}

.cta .section-title {
  color: var(--color-white);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.cta .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ── Contact form ── */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-input);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-white);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-teal);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--color-coral);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.field-error {
  font-size: 0.82rem;
  color: #ff8090;
  min-height: 1rem;
}

.btn-submit {
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading .btn-text { opacity: 0; }
.btn-submit.loading .btn-spinner { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-success {
  color: var(--color-sand);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 234, 167, 0.12);
  border-radius: var(--radius-input);
  border-left: 3px solid var(--color-sand);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #060d2e; /* slightly deeper than ocean */
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0.5rem 0;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--color-sand);
}

.footer-legal {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--color-teal);
}

/* ============================================================
   RESPONSIVE — tablet (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  .features-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE — desktop (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .features-grid,
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .about-visual {
    justify-content: flex-end;
  }

  .island-graphic {
    max-width: 320px;
  }

  .btn-submit {
    /* keep natural size */
  }
}

/* ============================================================
   RESPONSIVE — mobile nav collapse (< 640px)
   ============================================================ */
@media (max-width: 639px) {
  .nav-links {
    gap: 1rem;
  }

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

/* ============================================================
   FOCUS / ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   UTILITY
   ============================================================ */
[hidden] { display: none !important; }
