/*
  Strata-inspired Split-Screen Layout (CC BY 3.0 Attribution Retained)
  Adapted for Atelier Khelifi Architecture — Oran & Algiers, Algeria.
*/

:root {
  --sidebar-bg: #1f2428;
  --sidebar-bg-deep: #14181b;
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --main-bg: #ffffff;
  --surface-alt: #f7f7f7;
  --border-light: #e5e7eb;
  --text-dark: #2c3539;
  --text-body: #596368;
  --text-muted: #7b8489;
  --accent-mint: #49bf9d;
  --accent-mint-dark: #3aa586;
  --font-heading: "Plus Jakarta Sans", "Cairo", sans-serif;
  --font-body: "Source Sans 3", "Cairo", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--main-bg);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.3;
}

a {
  color: var(--accent-mint);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* Fixed Left Atmospheric Sidebar */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 34%;
  max-width: 420px;
  height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(73, 191, 157, 0.16), transparent 55%),
    linear-gradient(165deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  color: var(--sidebar-text);
  padding: 48px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  z-index: 20;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 28px;
}

.avatar-monogram {
  display: inline-block;
  margin-bottom: 14px;
}

#header h1 {
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 8px;
}

#header h1 strong {
  font-weight: 700;
}

#header .subtitle {
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.85);
}

#header .subtitle span {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--accent-mint);
}

.locations-tag {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.03em;
}

.side-nav ul {
  display: grid;
  gap: 10px;
}

.side-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Footer inside Sidebar */
#footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

#footer .icons {
  display: flex;
  gap: 14px;
}

#footer .icons a {
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  padding: 4px;
  transition: color 0.2s ease;
}

#footer .icons a:hover {
  color: var(--accent-mint);
}

#footer .copyright {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.5;
}

#footer .copyright a {
  color: rgba(255, 255, 255, 0.72);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.35);
}

/* Main Scrolling Column */
#main {
  margin-left: min(34%, 420px);
  padding: 64px 56px 80px;
  max-width: 960px;
}

.content-section {
  padding-bottom: 54px;
  margin-bottom: 54px;
  border-bottom: 2px solid var(--surface-alt);
}

.content-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 16px;
}

.content-section h2 {
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 20px;
}

#one .major h2 {
  font-size: 2rem;
  line-height: 1.3;
  color: var(--text-dark);
}

#one p + p {
  margin-top: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 6px;
  border: 2px solid var(--border-light);
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  border-color: var(--accent-mint);
  color: var(--accent-mint-dark);
}

.button.primary {
  background: var(--accent-mint);
  border-color: var(--accent-mint);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--accent-mint-dark);
  border-color: var(--accent-mint-dark);
  color: #ffffff;
}

/* 2-Column Project Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.work-item h3 {
  font-size: 1.05rem;
  margin: 12px 0 4px;
}

.work-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.work-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
  padding: 0;
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 40, 0.72);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.work-thumb:hover .thumb-overlay,
.work-thumb:focus-visible .thumb-overlay {
  opacity: 1;
}

/* DZD Feasibility Tiers */
.section-lead {
  margin-bottom: 24px;
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tier-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.tier-card.highlight {
  background: #ffffff;
  border: 2px solid var(--accent-mint);
}

.tier-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-mint-dark);
  font-weight: 600;
}

.tier-card h3 {
  font-size: 1.15rem;
  margin: 6px 0 10px;
}

.tier-price {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.tier-price span {
  font-size: 0.92rem;
  color: var(--accent-mint-dark);
}

.tier-card ul {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex: 1;
}

.tier-card li::before {
  content: "— ";
  color: var(--accent-mint-dark);
  font-weight: 700;
}

/* Contact Section */
.contact-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 32px;
  margin-top: 22px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 13px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text-dark);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-mint);
  background: #ffffff;
}

.form-status {
  font-size: 0.88rem;
  color: var(--accent-mint-dark);
  min-height: 1.2em;
}

.form-status.error {
  color: #dc2626;
}

.studio-info {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 22px;
  align-self: start;
}

.labeled-icons {
  display: grid;
  gap: 16px;
}

.labeled-icons strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.labeled-icons span,
.labeled-icons a {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 600;
}

.labeled-icons a:hover {
  color: var(--accent-mint-dark);
}

/* Lightbox Modal */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 24, 0.82);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}

.lightbox-card {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  max-width: 620px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(31, 36, 40, 0.85);
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  z-index: 2;
}

.lightbox-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.lightbox-body {
  padding: 20px 24px 24px;
}

.lightbox-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-mint-dark);
  margin-bottom: 4px;
}

.lightbox-body h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

/* Responsive (Tablet & Mobile 375px) */
@media (max-width: 980px) {
  #header {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    text-align: center;
    padding: 40px 24px 32px;
    gap: 24px;
  }

  .header-inner {
    align-items: center;
  }

  .side-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
  }

  #footer {
    align-items: center;
  }

  #main {
    margin-left: 0;
    padding: 40px 24px 56px;
  }

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

@media (max-width: 640px) {
  #main {
    padding: 32px 18px 48px;
  }

  #one .major h2 {
    font-size: 1.55rem;
  }

  .gallery-grid,
  .tiers-grid,
  .field-row {
    grid-template-columns: 1fr;
  }
}
