/* 
 * Hotzmatic Design System 
 * Based on method.com inspired style guide
 */

:root {
  /* Colors */
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-light-grey: #F4F4F4;
  --color-accent: #CCFF00;

  /* Typography */
  --font-primary: 'DM Sans', sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 120px;

  /* Grid */
  --grid-columns: 12;
  --grid-gap: 24px;
  --container-width: 1440px;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--color-white);
  color: var(--color-black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(48px, 5vw, 96px);
}

h2 {
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 600;
}

h3 {
  font-size: 24px;
  font-weight: 500;
}

p {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 1.5em;
}

.label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  width: 100%;
}

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

.section {
  padding: var(--spacing-xl) 0;
}

.section-dark {
  background-color: var(--color-black);
  color: var(--color-white);
}

.section-grey {
  background-color: var(--color-light-grey);
}

/* Components */
.btn {
  display: inline-block;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 16px;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-black);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  color: var(--color-black);
  border-color: var(--color-accent);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-black);
  color: var(--color-black);
}

.btn-secondary:hover {
  background-color: var(--color-black);
  color: var(--color-white);
}

.section-dark .btn-secondary {
  border-color: var(--color-white);
  color: var(--color-white);
}

.section-dark .btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-black);
}

.text-link {
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.text-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 4px 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.8s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 8px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: all 0.8s ease;
  flex-grow: 1;
}

.header.scrolled .header-group {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-right: var(--spacing-md);
}

.logo {
  font-size: 80px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--color-black);
  transition: all 0.8s ease;
  line-height: 1;
}

.logo-accent {
  color: #A8D800;
}

.header.scrolled .logo {
  font-size: 24px;
}

/* Dark header variant (used on blog/project detail pages) */
.header-dark {
  background-color: #000 !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
  box-shadow: none !important;
}
.header-dark .logo,
.header-dark .logo-accent,
.header-dark .nav-link,
.header-dark .lang-link,
.header-dark .lang-link.active {
  color: #fff !important;
}
.header-dark .btn-primary {
  background: #fff !important;
  color: #000 !important;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-md);
  margin-top: 16px;
  transition: all 0.8s ease;
}

.header.scrolled .nav-menu {
  margin-top: 0;
  margin-left: auto;
  /* Push to right in the group */
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link:hover {
  color: var(--color-accent);
  /* Or maybe just black/bold? Style guide says accent for hover states */
  /* Actually style guide says "Clean text links" */
}

.nav-link.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
}

.lang-link {
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lang-link:hover {
  color: var(--color-black);
}

.lang-link.active {
  color: var(--color-black);
  font-weight: 700;
}

.lang-separator {
  color: rgba(0, 0, 0, 0.3);
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 220px;
  /* Header offset increased for taller initial header */
  background-color: var(--color-black);
  /* Fallback */
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 24px;
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
}

/* Value Prop */
.value-prop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.value-statement {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}

.profile-image-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.profile-image {
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.profile-image:hover {
  filter: grayscale(0%);
}

/* Trusted By */
.trusted-by {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: var(--spacing-lg) 0;
}

/* Timeline */
.timeline-wrapper {
  position: relative;
  padding: 40px 0;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.timeline-line {
  position: absolute;
  top: 48px;
  /* Aligns with dots */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ccc;
  z-index: 0;
}

.timeline-arrow {
  position: absolute;
  top: 43px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-top: 2px solid #ccc;
  border-right: 2px solid #ccc;
  transform: rotate(45deg);
  z-index: 1;
}

.timeline-item {
  position: relative;
  z-index: 1;
  width: 30%;
  text-align: center;
  opacity: 0;
  /* Hidden initially for animation */
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background-color: var(--color-black);
  border-radius: 50%;
  margin: 0 auto 24px auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--color-light-grey);
  /* Creates gap from line */
}

.timeline-date {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--color-black);
}

.timeline-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.timeline-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Mobile Timeline */
@media (max-width: 768px) {
  .timeline-wrapper {
    flex-direction: column;
    padding-left: 20px;
    gap: 40px;
  }

  .timeline-line {
    width: 2px;
    height: 100%;
    top: 0;
    left: 27px;
    /* Aligns with dots */
  }

  .timeline-arrow {
    top: auto;
    bottom: -5px;
    left: 22px;
    right: auto;
    transform: rotate(135deg);
  }

  .timeline-item {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }

  .timeline-dot {
    margin: 0;
    flex-shrink: 0;
  }

  .timeline-content {
    padding-top: 0;
  }
}

.client-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  opacity: 0.6;
}

.client-logo-placeholder {
  height: 40px;
  background: #ddd;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
}

/* Projects Grid */
.project-card {
  grid-column: span 6;
  /* 2 columns on desktop */
  position: relative;

}

.project-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #ddd;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: grayscale(100%);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.project-info h3 {
  margin-bottom: 4px;
}

.project-info p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* Insights */
.insight-card {
  grid-column: span 4;
  /* 3 columns */
  border-top: 1px solid #000;
  padding-top: var(--spacing-sm);
}

.insight-date {
  font-size: 12px;
  color: #666;
  margin-bottom: var(--spacing-xs);
  display: block;
}

.insight-card h3 {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
}

/* Footer */
.footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: var(--spacing-xl) 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.footer-col h4 {
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0.5;
}

.footer-links li {
  margin-bottom: 8px;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .project-card {
    grid-column: span 6;
  }
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 20px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-black);
  transition: all 0.3s ease;
  border-radius: 1px;
}
.header-dark .menu-toggle span {
  background: #fff;
}
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .header-group {
    flex-wrap: wrap;
    width: 100%;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    margin-top: 0 !important;
  }
  .nav-menu.open {
    display: flex;
  }
  .header-actions {
    display: none;
    width: 100%;
    padding-bottom: 12px;
  }
  .header-actions.open {
    display: flex;
  }
  .header-inner {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .grid {
    display: flex;
    flex-direction: column;
  }

  .value-prop {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Blog / Insights Page */
.page-header {
  padding: calc(var(--spacing-xl) + 80px) 0 var(--spacing-lg) 0;
  background-color: var(--color-black);
  color: var(--color-white);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  font-size: 20px;
  opacity: 0.8;
  margin: 0;
}

.blog-article {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid #eee;
}

.blog-article:last-child {
  border-bottom: none;
}

.article-date {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-article h2 {
  font-size: 36px;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.article-content p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  color: #333;
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Career Timeline */
.career-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
  border-left: 2px solid #eee;
}

.career-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
}

.career-item:last-child {
  margin-bottom: 0;
}

.career-item::before {
  content: '';
  position: absolute;
  left: -49px;
  top: 0;
  width: 16px;
  height: 16px;
  background-color: var(--color-black);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-white);
}

.career-date {
  font-size: 14px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.career-content h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.career-content h3 {
  font-size: 18px;
  font-weight: 500;
  color: #666;
  margin-bottom: 16px;
}

.career-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
  color: #333;
}

.career-content li {
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tags span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background-color: var(--color-light-grey);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}