/* style.css — Alumitherm Assist Ltd Design Tokens & Components */

/* =====================================================
   FONTS — Plus Jakarta Sans (body) + DM Sans (display)
   ===================================================== */

/* =====================================================
   TYPE SCALE
   ===================================================== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* =====================================================
   SPACING (4px base)
   ===================================================== */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* =====================================================
   ALUMITHERM CUSTOM PALETTE — Navy + Teal
   ===================================================== */
:root, [data-theme="light"] {
  --font-display: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;

  /* Surfaces (warm neutral) */
  --color-bg:               #f5f4f0;
  --color-surface:          #fafaf7;
  --color-surface-2:        #ffffff;
  --color-surface-offset:   #eeedea;
  --color-surface-offset-2: #e7e5e1;
  --color-surface-dynamic:  #dddbd7;
  --color-divider:          #d4d2cd;
  --color-border:           #ccc9c3;

  /* Text */
  --color-text:           #1a1d2b;
  --color-text-muted:     #5c6070;
  --color-text-faint:     #9a9da8;
  --color-text-inverse:   #f5f4f0;

  /* Primary — Deep Navy */
  --color-primary:        #0f2b4c;
  --color-primary-hover:  #1a3d66;
  --color-primary-active: #0a1f38;
  --color-primary-highlight: #d6dfe8;

  /* Accent — Cyan Blue (matching logo) */
  --color-accent:         #00a5b8;
  --color-accent-hover:   #008e9e;
  --color-accent-active:  #007885;
  --color-accent-highlight: #ccecf0;

  /* Semantic */
  --color-error:          #b83232;
  --color-error-hover:    #a02828;
  --color-error-highlight: #f0d6d6;

  --color-success:        #2a7a3a;
  --color-success-hover:  #1e6a2e;
  --color-success-highlight: #d0e8d4;

  --color-warning:        #c47a10;
  --color-warning-hover:  #a86808;
  --color-warning-highlight: #f0e4cc;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (warm-tinted) */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* =====================================================
   DARK MODE
   ===================================================== */
[data-theme="dark"] {
  --color-bg:               #121820;
  --color-surface:          #182030;
  --color-surface-2:        #1e2838;
  --color-surface-offset:   #1a2232;
  --color-surface-offset-2: #222c3c;
  --color-surface-dynamic:  #2a3444;
  --color-divider:          #2e3848;
  --color-border:           #384252;

  --color-text:           #d8dce4;
  --color-text-muted:     #8892a4;
  --color-text-faint:     #586274;
  --color-text-inverse:   #121820;

  --color-primary:        #5a8ab8;
  --color-primary-hover:  #7aa4cc;
  --color-primary-active: #4a7aa8;
  --color-primary-highlight: #1e2e40;

  --color-accent:         #40c8d8;
  --color-accent-hover:   #5ad8e8;
  --color-accent-active:  #30b8c8;
  --color-accent-highlight: #1a2e32;

  --color-error:          #e06060;
  --color-error-hover:    #d04848;
  --color-error-highlight: #3a2020;

  --color-success:        #5aaa66;
  --color-success-hover:  #489a54;
  --color-success-highlight: #1e3024;

  --color-warning:        #e0a440;
  --color-warning-hover:  #cc9430;
  --color-warning-highlight: #3a2e18;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #121820;
    --color-surface:          #182030;
    --color-surface-2:        #1e2838;
    --color-surface-offset:   #1a2232;
    --color-surface-offset-2: #222c3c;
    --color-surface-dynamic:  #2a3444;
    --color-divider:          #2e3848;
    --color-border:           #384252;
    --color-text:           #d8dce4;
    --color-text-muted:     #8892a4;
    --color-text-faint:     #586274;
    --color-text-inverse:   #121820;
    --color-primary:        #5a8ab8;
    --color-primary-hover:  #7aa4cc;
    --color-primary-active: #4a7aa8;
    --color-primary-highlight: #1e2e40;
    --color-accent:         #3cb896;
    --color-accent-hover:   #50ccaa;
    --color-accent-active:  #2ea884;
    --color-accent-highlight: #1a3028;
    --color-error:          #e06060;
    --color-error-hover:    #d04848;
    --color-error-highlight: #3a2020;
    --color-success:        #5aaa66;
    --color-success-hover:  #489a54;
    --color-success-highlight: #1e3024;
    --color-warning:        #e0a440;
    --color-warning-hover:  #cc9430;
    --color-warning-highlight: #3a2e18;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* =====================================================
   GLOBAL COMPONENT STYLES
   ===================================================== */

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-2);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-link svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.logo-link img {
  width: 72px;
  height: auto;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--color-primary);
}
.logo-brand {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  white-space: nowrap;
}
.logo-sub {
  display: block;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}
.main-nav a.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Header controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.theme-toggle,
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}
.theme-toggle:hover,
.mobile-menu-toggle:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.06);
}
.mobile-menu-toggle {
  display: none;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: var(--space-20) var(--space-6) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  font-size: var(--text-lg);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive);
}
.mobile-nav a:hover {
  background: oklch(from var(--color-text) l c h / 0.05);
}
.mobile-nav-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text);
}

@media (max-width: 840px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    oklch(from var(--color-primary) l c h / 0.88) 0%,
    oklch(from var(--color-primary) l c h / 0.72) 60%,
    oklch(from var(--color-accent) l c h / 0.6) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-16) var(--space-4);
  color: #fff;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  max-width: 18ch;
  margin-bottom: var(--space-4);
}
.hero-subtitle {
  font-size: var(--text-base);
  line-height: 1.6;
  max-width: 50ch;
  opacity: 0.9;
  margin-bottom: var(--space-6);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive);
}
.hero-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}
.hero-cta:active {
  transform: translateY(0);
}

/* Sub-page hero (smaller) */
.hero-sub {
  min-height: 40vh;
}

/* Sections */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.section-narrow {
  max-width: var(--content-default);
  margin-inline: auto;
}
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

/* Alternate background sections */
.section-alt {
  background: var(--color-surface);
}
.section-dark {
  background: var(--color-primary);
  color: #fff;
}
.section-dark .section-label {
  color: var(--color-accent);
}
.section-dark .section-title {
  color: #fff;
}
.section-dark .section-desc {
  color: rgba(255,255,255,0.75);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--space-6);
}
.card {
  background: var(--color-surface-2);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-highlight);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-accent);
}
.card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Feature / Why Choose Us */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: var(--space-6);
}
.feature-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.feature-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  line-height: 1;
}
.feature-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.feature-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Service lists */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-4);
  list-style: none;
}
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.service-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  margin-top: 2px;
}

/* Two-column content */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid oklch(from var(--color-primary) l c h / 0.3);
  transition: all var(--transition-interactive);
  cursor: pointer;
}
.btn-secondary:hover {
  background: oklch(from var(--color-primary) l c h / 0.06);
  border-color: oklch(from var(--color-primary) l c h / 0.5);
}

/* CTA Band */
.cta-band {
  background: var(--color-primary);
  padding: var(--space-12) var(--space-4);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
}
.cta-band p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.cta-band .btn-primary {
  background: var(--color-accent);
}
.cta-band .btn-primary:hover {
  background: var(--color-accent-hover);
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: var(--space-4);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.form-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.form-group input,
.form-group textarea {
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px oklch(from var(--color-accent) l c h / 0.15);
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Contact info card */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-info-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.contact-info-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  margin-top: 3px;
}
.contact-info-item strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.contact-info-item span,
.contact-info-item a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.contact-info-item a:hover {
  color: var(--color-accent);
}

/* Footer */
.site-footer {
  background: var(--color-surface-offset);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding: var(--space-12) var(--space-4) var(--space-6);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 36ch;
}
.footer-nav h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-nav a:hover {
  color: var(--color-accent);
}
.footer-bottom {
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-bottom a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: var(--color-accent);
}

/* Sector tags */
.sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.sector-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-accent-highlight);
  color: var(--color-accent);
}

/* Project cards */
.project-card {
  background: var(--color-surface-2);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive);
}
.project-card:hover {
  box-shadow: var(--shadow-md);
}
.project-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-card-body {
  padding: var(--space-5);
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.project-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
}

/* Print */
@media print {
  .site-header, .site-footer, .mobile-nav { display: none; }
  .hero { min-height: auto; }
  body { color: #000; background: #fff; }
}
