/* ─────────────────────────────────────────────────────────────
   OBYW.one Agency — style.css
   Inter + Playfair Display · Dark theme
   Single stylesheet, no framework.
   ───────────────────────────────────────────────────────────── */

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

:root {
  --bg:            #1A1A2E;
  --bg-card:       #22223A;
  --bg-card-hover: #2A2A48;
  --bg-surface:    #16162A;
  --accent:        #0A9396;
  --accent-light:  #14B8BB;
  --accent-dark:   #077F82;
  --white:         #FFFFFF;
  --text:          #E8E8ED;
  --text-light:    #A0A0B8;
  --text-faded:    #6C6C88;
  --border:        #2E2E4A;
  --shadow:        rgba(0, 0, 0, 0.25);
  --shadow-strong: rgba(0, 0, 0, 0.40);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --radius: 8px;
  --radius-lg: 12px;
  --container-max: 1100px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* iOS safe area */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0);
  background: var(--bg);
  z-index: 9999;
}
body::after {
  content: '';
  display: block;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: env(safe-area-inset-bottom, 0);
  background: var(--bg);
  z-index: 9999;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ──────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

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

/* ── Header ──────────────────────────────────────────────── */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  padding-top: calc(16px + env(safe-area-inset-top, 0));
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.header-logo:hover { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--white); }

.header-nav .nav-cta {
  background: var(--accent);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
}
.header-nav .nav-cta:hover {
  background: var(--accent-light);
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.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); }

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-light);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(10, 147, 150, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--text-light);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 18px 36px;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  padding: 180px 0 100px;
  text-align: center;
}

.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Services ────────────────────────────────────────────── */

.services {
  padding: 100px 0;
}

.services h2,
.portfolio h2,
.stack h2,
.contact h2 {
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto 52px;
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.service-icon {
  color: var(--accent);
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* ── Portfolio ───────────────────────────────────────────── */

.portfolio {
  padding: 100px 0;
  background: var(--bg-surface);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.portfolio-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.portfolio-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(10, 147, 150, 0.12);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.portfolio-card h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.portfolio-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ── Tech Stack ──────────────────────────────────────────── */

.stack {
  padding: 100px 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stack-item {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.stack-item:hover {
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.stack-item strong {
  display: block;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 4px;
}

.stack-item span {
  font-size: 0.82rem;
  color: var(--text-faded);
}

/* ── Contact CTA ─────────────────────────────────────────── */

.contact {
  padding: 100px 0;
  background: var(--bg-surface);
  text-align: center;
}

.contact .section-sub {
  margin-bottom: 36px;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  padding: 32px 0;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 0.88rem;
  color: var(--text-faded);
}
.footer-brand strong {
  color: var(--text-light);
}

.footer-sep {
  margin: 0 8px;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.88rem;
  color: var(--text-faded);
}
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .header-nav.open { display: flex; }

  .header-nav .nav-cta {
    text-align: center;
    width: 100%;
  }

  .nav-toggle { display: flex; }

  .hero {
    padding: 140px 0 72px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .services,
  .portfolio,
  .stack,
  .contact {
    padding: 72px 0;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero { padding: 120px 0 56px; }

  .service-card,
  .portfolio-card {
    padding: 24px 20px;
  }

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

/* ── Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
