/* ============================================================
   styles.css — Baseline Website Template
   Organized: Tokens → Reset → Layout → Components → Sections
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* -- Colors -- */
  --color-bg:         #ffffff;      /* background     */
  --color-surface:    #ffffff;      /* surface           */
  --color-ink:        #000000;      /* text                  */
  --color-ink-muted:  #4d4d4d;      /* muted text        */
  --color-accent:     #ff00d4;      /* accent   */
  --color-accent-alt: #44ffff;      /* accent alternative       */
  --color-border:     #333333;      /* dark borders                */
  --color-hero-bg:    #ffffff;      /* hero background          */
  --color-hero-text:  #000000;      /* hero text               */

  /* -- Typography -- */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --text-xs:   0.75rem;    /*  12px */
  --text-sm:   0.875rem;   /*  14px */
  --text-base: 1rem;       /*  16px */
  --text-lg:   1.125rem;   /*  18px */
  --text-xl:   1.25rem;    /*  20px */
  --text-2xl:  1.5rem;     /*  24px */
  --text-3xl:  2rem;       /*  32px */
  --text-4xl:  2.75rem;    /*  44px */
  --text-5xl:  3.75rem;    /*  60px */

  /* -- Spacing -- */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* -- Layout -- */
  --container-max: 1120px;
  --container-pad: var(--space-6);

  /* -- Misc -- */
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
  --transition:  200ms ease;
  --header-h:   64px;
}


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

html {
  font-size: 100%;
  scroll-behavior: smooth;          /* JS fallback provided in script.js */
  scroll-padding-top: var(--header-h); /* offset anchors for sticky header */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 400;
}


/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */

/* Centered max-width wrapper */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Section vertical rhythm */
section {
  padding-block: var(--space-24);
}

/* Shared section label (eyebrow text) */
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* Shared section heading */
.section-heading {
  font-size: var(--text-4xl);
  color: var(--color-ink);
  margin-bottom: var(--space-8);
}


/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #b5572a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,98,47,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--color-hero-text);
  border: 1.5px solid rgba(248,246,241,0.35);
}

.btn-ghost:hover {
  border-color: var(--color-hero-text);
  background: rgba(248,246,241,0.1);
}

.btn-full {
  width: 100%;
  justify-content: center;
}


/* ============================================================
   5. SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,246,241,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.logo-img {
  width: 42px;
  height: auto;
  display: block;
}

.logo-dot {
  color: var(--color-accent-alt);
}

/* Desktop nav */
.nav-desktop ul {
  display: flex;
  gap: var(--space-8);
}

.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav-desktop a:hover {
  color: var(--color-ink);
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;           /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: var(--color-border);
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger → X animation when open */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;           /* hidden on desktop; JS handles mobile */
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms ease;
}

.nav-mobile.is-open {
  max-height: 260px;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-6) var(--space-6);
  gap: var(--space-1);
}

.nav-mobile a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-ink-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}

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


/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  background-color: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding-block: var(--space-32);
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.38;
  filter: brightness(0.78);
  z-index: 0;
  pointer-events: none;
}

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

/* Small label above headline */
.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-alt);
  margin-bottom: var(--space-4);
}

/* Main headline */
.hero-headline {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-5xl));
  line-height: 1.05;
  color: var(--color-hero-text);
  margin-bottom: var(--space-6);
  max-width: 14ch;
}

.hero-headline em {
  font-style: italic;
  color: var(--color-accent);
}

/* Sub-copy */
.hero-sub {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--color-ink-muted);
  max-width: 48ch;
  margin-bottom: var(--space-10);
  line-height: 1.65;
}

/* CTA buttons row */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* Decorative background blob */
.hero-blob {
  position: absolute;
  top: -120px;
  right: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,98,47,0.18) 0%, transparent 70%);
  pointer-events: none;
}


/* ============================================================
   7. ABOUT SECTION
   ============================================================ */
.about {
  background: var(--color-bg);
}

.about-inner {}

/* Two-column layout: text left, cards right */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--space-16);
  align-items: start;
}

.about-text p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-4);
  max-width: 44ch;
}

/* Feature cards grid */
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--color-accent);
}

.card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-ink);
}

.card p {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  line-height: 1.6;
}


/* Portfolio cards */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.portfolio-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.portfolio-card h3 {
  margin: var(--space-4) var(--space-4) var(--space-2);
  font-size: var(--text-xl);
}

.portfolio-card p {
  margin: 0 var(--space-4) var(--space-5);
  color: var(--color-ink-muted);
  line-height: 1.65;
}

/* ============================================================
   8. CONTACT SECTION
   ============================================================ */
.contact {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.contact-inner {}

.contact-sub {
  color: var(--color-ink-muted);
  max-width: 50ch;
  margin-bottom: var(--space-12);
}

/* Form layout */
.contact-form {
  max-width: 640px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201,98,47,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-ink-muted);
  opacity: 0.6;
}

/* Submit button row */
.contact-form .btn-full {
  margin-top: var(--space-2);
}

/* Disclaimer */
.form-note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  text-align: center;
  opacity: 0.7;
}


/* ============================================================
   9. SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  color: var(--color-ink-muted);
  padding-block: var(--space-8);
}

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

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-hero-text);
}

.footer-copy {
  font-size: var(--text-sm);
}

.footer-nav {
  display: flex;
  gap: var(--space-6);
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
  transition: color var(--transition);
}

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


/* ============================================================
   10. RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-text p {
    max-width: 100%;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ============================================================
   11. RESPONSIVE — MOBILE (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {

  /* Show hamburger, hide desktop nav */
  .nav-toggle {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  .nav-mobile {
    display: block;
  }

  /* Section padding tightened */
  section {
    padding-block: var(--space-16);
  }

  /* Hero adjustments */
  .hero {
    padding-block: var(--space-24);
  }

  /* Section headings */
  .section-heading {
    font-size: var(--text-3xl);
  }

  /* Cards stack to 1 column */
  .about-cards {
    grid-template-columns: 1fr;
  }

  /* Contact form row stacks */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer stacks */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}


/* ============================================================
   12. ACCESSIBILITY — FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip-to-content utility (add <a href="#main" class="skip-link"> if desired) */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 500;
  z-index: 999;
  transition: top var(--transition);
}

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