/* ============================================================
   BERTINO CONSULTING — styles.css
   ============================================================ */

/* ── Custom properties ────────────────────────────────────── */
:root {
  /* Colors */
  --color-primary:        #2E5CFF;
  --color-primary-hover:  #1A43CC;
  --color-bg:             #FBF3EC;
  --color-text:           #111111;
  --color-text-secondary: #6B6560;
  --color-muted:          #6B6560;
  --color-card-bg:        #F5EDE6;
  --color-surface-tinted: #F5EDE6;
  --color-footer-bg:      #111111;
  --color-footer-text:    #F5EDE6;
  --color-footer-muted:   #9A938C;
  --color-border:         #E8E0D8;
  --color-accent-coral:   #F2614A;

  /* Spacing */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-6:  48px;
  --space-8:  64px;
  --space-12: 96px;

  /* Shape */
  --radius:    12px;
  --radius-sm: 6px;
  --radius-lg: 20px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);

  /* Motion */
  --duration-fast:   150ms;
  --duration-base:   200ms;
  --duration-slow:   300ms;
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-width: 960px;
  --font-base: 'Inter', sans-serif;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* ── Skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-2);
}

/* ── Focus styles ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Layout utility ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Two-column section layout: label | body */
.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.section-label h2 {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-top: 6px; /* optical alignment with body text */
}

.section-body p + p {
  margin-top: var(--space-3);
}

/* ── Navigation ───────────────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--duration-base) ease, border-bottom-color var(--duration-base) ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background-color: var(--color-bg);
  border-bottom-color: var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-wordmark {
  height: 2.65rem;
  width: auto;
  transition: height var(--duration-slow) var(--ease-out);
}

#nav.scrolled .nav-wordmark {
  height: 1.65rem;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
}

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

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

/* ── Animations ───────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

#hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: var(--space-4);
  animation: fade-up 0.5s ease-out both;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: var(--space-8);
  animation: fade-up 0.5s 0.1s ease-out both;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  animation: fade-up 0.6s 0.2s ease-out both;
}

/* ── Scroll margin (accounts for sticky nav) ──────────────── */
#about,
#services,
#clients,
#contact {
  scroll-margin-top: var(--nav-height);
}

/* ── About ────────────────────────────────────────────────── */
#about {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  border-top: 1px solid var(--color-border);
}

#about .section-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}

/* ── Services ─────────────────────────────────────────────── */
#services {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  border-top: 1px solid var(--color-border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6) var(--space-6);
  margin-bottom: var(--space-6);
  align-items: start;
}

.service-card {
  padding: 0;
  transition: transform var(--duration-base) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card h3::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
  margin-top: var(--space-2);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.callout-card {
  background-color: var(--color-card-bg);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.callout-card .callout-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.callout-card p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* ── Clients ──────────────────────────────────────────────── */
#clients {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  border-top: 1px solid var(--color-border);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.client-column-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.client-column-label::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
  margin-top: var(--space-2);
}

.client-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.client-column li {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
}

/* ── Footer / Contact ─────────────────────────────────────── */
#contact {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
}

.footer-top {
  padding-bottom: var(--space-12);
}

.logo-mark-large {
  height: 80px;
  width: auto;
  margin-bottom: var(--space-6);
}

#contact h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: var(--space-4);
  color: var(--color-footer-text);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-footer-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--duration-fast) ease;
}

.cta-link:hover {
  color: var(--color-footer-text);
}

.cta-link .arrow {
  display: inline-block;
  color: var(--color-accent-coral);
  transition: transform var(--duration-base) var(--ease-out);
}

.cta-link:hover .arrow {
  transform: translateX(5px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(245, 237, 230, 0.12);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--color-footer-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  font-size: 0.8125rem;
  color: var(--color-footer-text);
  transition: color var(--duration-fast) ease;
  padding: 12px 4px;
}

.footer-social a:hover {
  color: var(--color-footer-text);
  text-decoration: underline;
}

#contact :focus-visible {
  outline-color: var(--color-footer-text);
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #hero h1,
  .hero-sub,
  .hero-image {
    animation: none;
  }

  #nav,
  .nav-wordmark,
  .nav-links a,
  .service-card,
  .cta-link,
  .cta-link .arrow,
  .footer-social a {
    transition: none;
  }
}

/* ── Responsive — 768px ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    gap: var(--space-3);
  }

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

  .nav-wordmark {
    height: 1.5rem;
  }

  /* Hero */
  #hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  /* Section grids: stack label above body */
  .section-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* Services grid: single column */
  .services-grid {
    grid-template-columns: 1fr;
  }


  /* Clients grid: single column */
  .clients-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Footer bottom: stack */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none; /* hide links entirely on very small screens */
  }
}
