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

/* ── Custom properties ────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:             #FBF3EC;
  --color-text:           #111111;
  --color-text-secondary: #6B6560;
  --color-muted:          #6B6560;
  --color-card-bg:        #F5EDE6;
  --color-surface-tinted: #F5EDE6;
  --color-border:         #E8E0D8;

  /* 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: 664px; /* 600px content column + 2 × --space-4 gutters */
  --font-base: 'Inter', sans-serif;
}

/* ── 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-text);
  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-text);
  outline-offset: 3px;
  border-radius: 2px;
}

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

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

/* ── 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-3);
}

#hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
  text-wrap: balance;
  animation: fade-up 0.5s 0.1s ease-out both;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 630; /* crop ratio of the original 800px-wide hero */
  object-fit: cover;
  border-radius: var(--radius);
  overflow: hidden;
  animation: fade-up 0.6s ease-out both;
}

/* ── About ────────────────────────────────────────────────── */
#about {
  padding-bottom: var(--space-12);
}

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

/* ── Footer ───────────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-4);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-left: auto;
  margin-right: -8px; /* offsets the links' tap-target padding so text aligns to the column edge */
}

.footer-links a {
  display: inline-block;
  min-width: 44px; /* 44px minimum tap target, including the short "X" link */
  padding: 12px 8px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) ease;
}

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

.footer-links a:hover {
  text-decoration: underline;
}

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

  .footer-links a {
    transition: none;
  }
}

/* ── Responsive — 768px ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero */
  #hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-3);
  }
}

/* ── Responsive — 480px ───────────────────────────────────── */
@media (max-width: 480px) {
  /* Footer: links first (they wrap), copyright below, all left-aligned */
  .footer-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .footer-links {
    margin-left: -8px;
    margin-right: 0;
  }
}
