/* =============================================
   FUTC — Felix Umland
   Zero-dependency stylesheet
   ============================================= */

/* ─── CSS Custom Properties ─── */
:root {
  --bg:          #0a0a0a;
  --bg-elevated: #141414;
  --bg-card:     #111111;
  --fg:          #ffffff;
  --fg-muted:    #a0a0a0;
  --fg-dim:      #666666;
  --accent:      #ff6b35;
  --accent-soft: rgba(255,107,53,0.12);
  --accent-glow: rgba(255,107,53,0.35);
  --border:      rgba(255,255,255,0.08);
  --border-hover:rgba(255,255,255,0.18);
  --radius:      12px;
  --radius-sm:   8px;
  --maxw:        1200px;
  --font-head:   'Outfit', system-ui, sans-serif;
  --font-body:   'Space Grotesk', system-ui, sans-serif;
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--fg); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ─── Utilities ─── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

/* ─── Skip Link ─── */
.skip-link {
  position: absolute; left: 0;
  background: var(--accent); color: #000; font-weight: 600;
  padding: 8px 16px; z-index: 200;
  transition: transform 0.2s ease;
  transform: translateY(-100%);
}
.skip-link:focus { transform: translateY(0); }

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; line-height: 1.2;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.nav-logo img {
  width: auto; height: 32px; border-radius: 6px; object-fit: contain;
}
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  width: 28px; height: 20px; position: relative;
  z-index: 120;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--fg); border-radius: 2px;
  transition: var(--transition); transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-links {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 110;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 60px; gap: 4px;
  font-size: 18px; font-weight: 500;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-links li { list-style: none; width: 100%; text-align: center; }
.nav-links a {
  display: block; padding: 14px 24px;
  position: relative;
}
.nav-links a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--accent); transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 60px; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 60px; }
.nav-spacer { height: 16px; margin-top: 8px; border-top: 1px solid var(--border); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static; inset: auto;
    flex-direction: row; align-items: center; gap: 0;
    padding-top: 0;
    font-size: 14px;
    background: none;
    transform: none; opacity: 1; pointer-events: auto;
  }
  .nav-links li { width: auto; }
  .nav-links a { padding: 4px 0; margin: 0 14px; }
  .nav-links a::after { left: 0; transform: none; }
  .nav-links a:hover::after { width: 100%; }
  .nav-links a.active::after { width: 100%; }
  .nav-spacer {
    width: 1px; height: 16px;
    border-top: none; border-left: 1px solid var(--border);
    margin: 0 6px;
  }
}

/* ─── Hero ─── */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero-media {
  position: relative; width: 100%; height: 45vh; min-height: 280px;
  overflow: hidden;
  order: 1;
}
.hero-img-wrap {
  position: absolute; inset: 0;
  will-change: transform;
}
.hero-img-wrap img {
  width: 100%; height: 120%; object-fit: cover; object-position: center center;
  transform: translateY(0);
  will-change: transform;
}
.hero-content {
  position: relative; z-index: 4;
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
  order: 2;
}
.bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; opacity: 0.45;
}
.hero-text {
  position: relative; z-index: 3;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #e0e0e0 50%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.8s 0.2s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 400; color: var(--fg-muted);
  margin-bottom: 20px; min-height: 1.5em;
  opacity: 0; animation: fadeUp 0.8s 0.5s ease forwards;
}
.typed-cursor {
  color: var(--accent); animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--fg-dim); max-width: 500px; margin: 0 auto 32px;
  opacity: 0; animation: fadeUp 0.8s 0.8s ease forwards;
}
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 4; color: var(--fg-dim);
  animation: bounce 2s ease infinite;
  cursor: pointer;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@media (min-width: 900px) {
  .hero { flex-direction: row; }
  .hero-media {
    order: -1; width: 45%; height: 100vh; height: 100dvh; min-height: auto;
  }
  .hero-img-wrap img {
    height: 130%; object-position: center center;
  }
  .hero-content {
    width: 55%; order: 0; text-align: left; align-items: flex-start;
    padding: 0 60px;
  }
  .hero-text { text-align: left; }
  .hero-desc { margin: 0 0 32px; }
  .hero-scroll { left: 77.5%; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 100px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  letter-spacing: 0.3px; transition: var(--transition);
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #ff8555; color: #fff;
  box-shadow: 0 6px 30px var(--accent-glow);
  transform: translateY(-2px);
}
.btn svg { transition: transform 0.3s ease; }
.btn:hover svg { transform: translateX(3px); }

/* ─── Sections ─── */
.section { padding: 100px 0; }
.section-header {
  text-align: center; margin-bottom: 60px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; letter-spacing: -1px;
  margin-bottom: 8px;
}
.section-subtitle {
  font-size: 16px; color: var(--fg-dim); font-weight: 400;
}

/* ─── About ─── */
.about-grid {
  display: grid; gap: 48px;
}
.about-text p {
  font-size: 17px; color: var(--fg-muted); margin-bottom: 20px;
}
.about-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.about-info { max-width: 400px; }
.info-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.info-list strong { color: var(--fg); font-weight: 500; }
.info-list span, .info-list a { color: var(--fg-muted); }
.info-list a:hover { color: var(--accent); }
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 2fr 1fr; align-items: start; }
}

/* ─── Projects ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.project-card:hover::before { opacity: 1; }
.project-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 20px;
}
.project-card h3 {
  font-family: var(--font-head); font-size: 18px; font-weight: 600;
  margin-bottom: 10px;
}
.project-card h3 a:hover { color: var(--accent); }
.project-card p {
  font-size: 14px; color: var(--fg-dim); line-height: 1.6; margin-bottom: 16px;
}
.project-link {
  font-size: 14px; font-weight: 500; color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
}
.project-link:hover { gap: 8px; }

/* ─── Press ─── */
.press { text-align: center; margin-top: 60px; }
.press-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--fg-dim); margin-bottom: 16px;
}
.press-links {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.press-links a {
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  color: var(--fg-muted); position: relative;
}
.press-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px;
  background: var(--accent); transition: width 0.3s ease;
}
.press-links a:hover { color: var(--fg); }
.press-links a:hover::after { width: 100%; }

/* ─── Services ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  text-align: center;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-soft);
  transform: translateY(-4px);
}
.service-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin: 0 auto 20px;
}
.service-card h3 {
  font-family: var(--font-head); font-size: 18px; font-weight: 600;
  margin-bottom: 12px; line-height: 1.3;
}
.service-card p {
  font-size: 14px; color: var(--fg-dim); line-height: 1.6;
}

/* ─── Contact ─── */
.contact-grid {
  display: grid; gap: 48px;
}
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--fg-dim); margin-bottom: 8px;
}
.form-group label strong { color: var(--accent); }
.form-group input,
.form-group textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg); font-family: inherit; font-size: 15px;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--fg-dim); }
.form-group textarea { min-height: 140px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }
.alert-success {
  margin-top: 16px; padding: 14px 20px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm); color: #4ade80; font-size: 14px;
}
.alert-error {
  margin-top: 16px; padding: 14px 20px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm); color: #f87171; font-size: 14px;
}
.contact-info h3 {
  font-family: var(--font-head); font-size: 24px; font-weight: 700;
  margin-bottom: 4px;
}
.contact-role {
  font-size: 15px; color: var(--fg-dim); margin-bottom: 24px;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}

/* ─── Footer ─── */
.footer {
  padding: 48px 24px; text-align: center;
  border-top: 1px solid var(--border);
}
.socials {
  display: flex; justify-content: center; gap: 20px; margin-bottom: 20px;
}
.socials a {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--fg-muted); transition: var(--transition);
}
.socials a:hover {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-soft);
  transform: translateY(-2px);
}
.footer-copy {
  font-size: 13px; color: var(--fg-dim);
}

/* ─── Reveal Animations ─── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fg-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

/* ─── Selection ─── */
::selection { background: var(--accent-soft); color: var(--fg); }

/* ─── Focus ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-canvas { display: none; }
  .reveal { opacity: 1; transform: none; }
}
