/* ===================================================================
   SIZUNE — Precision Noir
   Dark editorial aesthetic with geometric accents
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@300;400;500;600&display=swap');

/* ===== Custom Properties ===== */
:root {
  --color-bg:       #0c0c0c;
  --color-bg-raised:#141414;
  --color-bg-card:  #1a1a1a;
  --color-surface:  #222;
  --color-border:   #2a2a2a;
  --color-text:     #f2ece4;
  --color-text-dim: #8a8377;
  --color-accent:   #d4a039;
  --color-accent-hover: #e8b44d;
  --color-success:  #4ade80;
  --color-error:    #f87171;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Outfit', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s;
}

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

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

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== Noise Overlay (texture) ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-text);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

.nav-logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  text-decoration: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  width: 32px;
  height: 24px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  position: absolute;
  left: 4px;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}

.nav-toggle span:nth-child(1) { top: 4px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

/* Animated grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 160, 57, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 160, 57, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Radial glow */
.hero::after {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 57, 0.08) 0%, transparent 60%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

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

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--color-accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s var(--ease-out-expo) 0.4s forwards;
}

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

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-dim);
  max-width: 560px;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.7s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.9s forwards;
}

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

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 160, 57, 0.25);
}

.btn-primary .btn-arrow {
  transition: transform 0.4s var(--ease-out-expo);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* ===== Section System ===== */
.section {
  padding: 7rem 0;
  position: relative;
}

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

.section--raised {
  background: var(--color-bg-raised);
}

.section-header {
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding-left: 3rem;
  position: relative;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--color-accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.15;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.service-card {
  background: var(--color-bg);
  padding: 3rem 2.5rem;
  position: relative;
  transition: background 0.5s var(--ease-out-expo);
}

.service-card:hover {
  background: var(--color-bg-raised);
}

.service-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-style: italic;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 2rem;
  transition: color 0.5s var(--ease-out-expo);
}

.service-card:hover .service-number {
  color: var(--color-accent);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== Why Sizune ===== */
.why-section {
  border-top: 1px solid var(--color-border);
}

.why-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.why-text {
  padding-top: 0.5rem;
}

.why-text p {
  color: var(--color-text-dim);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.why-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.why-item:first-child {
  border-top: 1px solid var(--color-border);
}

.why-item-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-accent);
  padding-top: 0.15rem;
}

.why-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.why-item p {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.project-card {
  background: var(--color-bg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  gap: 1.25rem;
  position: relative;
  transition: background 0.5s var(--ease-out-expo);
}

.project-card:hover {
  background: var(--color-bg-card);
}

.project-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.2;
}

.project-desc {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  background: var(--color-surface);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

/* ===== CTA Band ===== */
.cta-band {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.cta-band h2 em {
  font-style: italic;
  color: var(--color-accent);
}

.cta-band p {
  color: var(--color-text-dim);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.cta-band .btn {
  opacity: 1;
  transform: none;
  animation: none;
}

/* ===== Contact Form ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}

.contact-info h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.contact-info p {
  color: var(--color-text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
}

.contact-detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  min-width: 4rem;
}

.contact-detail a {
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 0.75rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  transition: border-color 0.4s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.form-submit-row .btn {
  opacity: 1;
  transform: none;
  animation: none;
}

.form-status {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
  border-left: 2px solid;
}

.form-status--success {
  display: block;
  background: rgba(74, 222, 128, 0.08);
  color: var(--color-success);
  border-color: var(--color-success);
}

.form-status--error {
  display: block;
  background: rgba(248, 113, 113, 0.08);
  color: var(--color-error);
  border-color: var(--color-error);
}

.contact-fallback {
  color: var(--color-text-dim);
  font-size: 0.9rem;
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 8rem;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.legal-content .legal-date {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 1.25rem;
  color: var(--color-text-dim);
  line-height: 1.8;
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content li::marker {
  color: var(--color-accent);
}

.legal-content a {
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
}

.legal-content strong {
  color: var(--color-text);
  font-weight: 500;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

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

.footer-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.footer-links a {
  color: var(--color-text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

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

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .why-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12, 12, 12, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav {
    position: relative;
  }

  .hero {
    min-height: auto;
    padding: 10rem 0 5rem;
  }

  .section {
    padding: 5rem 0;
  }

  .service-card {
    padding: 2.5rem 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .form-submit-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-submit-row .contact-fallback {
    text-align: center;
  }
}
