:root {
  --bg: #071018;
  --panel: #0d1722;
  --panel-2: #111f2d;
  --text: #f5f7fa;
  --muted: #9aa8b6;
  --line: rgba(255,255,255,.10);
  --accent: #ffb020;
  --accent-2: #ffd27a;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --content: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at top right, rgba(255,176,32,.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding:
    max(14px, env(safe-area-inset-top))
    clamp(16px, 4vw, 40px)
    14px;
  background: rgba(7,16,24,.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark,
.profile-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #16100a;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: .03em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.desktop-nav a:hover {
  color: var(--text);
}

.profile-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

main {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  min-height: calc(100svh - 72px);
  padding: clamp(48px, 8vw, 100px) 0;
}

.hero-copy,
.visual-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 6vw, 84px);
  line-height: .96;
  letter-spacing: -.055em;
}

h1 span {
  display: block;
  color: var(--accent);
}

.hero-copy > p,
.visual-copy > p,
.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy > p {
  max-width: 640px;
  font-size: clamp(16px, 1.5vw, 20px);
}

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

.button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.button-primary {
  border-color: transparent;
  background: var(--accent);
  color: #171009;
  font-weight: 800;
}

.button-secondary {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.hero-visual,
.ambient-visual {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual img,
.ambient-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual {
  aspect-ratio: 1 / 1;
}

.section {
  padding: clamp(72px, 10vw, 140px) 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.04em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent),
    var(--panel);
}

.card-label {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.visual-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.ambient-visual {
  aspect-ratio: 16 / 10;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1023px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    aspect-ratio: 16 / 10;
  }

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

  .visual-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 62px;
  }

  .desktop-nav {
    display: none;
  }

  main {
    padding-inline: clamp(14px, 4vw, 20px);
    padding-bottom: 48px;
  }

  .hero {
    gap: 28px;
    padding: 40px 0 24px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    min-height: 52px;
  }

  .hero-visual {
    aspect-ratio: 1 / 1;
    border-radius: 20px;
  }

  .section {
    padding-top: 72px;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head .button {
    width: auto;
    align-self: flex-start;
  }

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

  .project-card {
    min-height: 0;
  }

  .ambient-visual {
    aspect-ratio: 1 / 1;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10,18,27,.92);
    backdrop-filter: blur(20px);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-nav a:first-child {
    background: rgba(255,176,32,.13);
    color: var(--accent);
  }
}

@media (max-width: 359px) {
  .brand small {
    display: none;
  }

  h1 {
    font-size: 36px;
  }

  .project-card {
    padding: 20px;
  }
}

@media (min-width: 1366px) {
  :root {
    --content: 1280px;
  }
}

@media (min-width: 1920px) {
  :root {
    --content: 1440px;
  }
}

/* V6.1 RESPONSIVE HERO FIX */

.hero-copy {
  container-type: inline-size;
}

h1 {
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: clamp(32px, 4vw, 52px);
  }

  h1 {
    font-size: clamp(48px, 5vw, 64px);
    line-height: .98;
    letter-spacing: -.045em;
  }

  .hero-copy > p {
    font-size: 17px;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: clamp(34px, 10.5vw, 48px);
    line-height: 1;
    letter-spacing: -.045em;
  }

  .hero-copy > p {
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 26px;
  }
}

@media (max-width: 359px) {
  h1 {
    font-size: 34px;
    letter-spacing: -.04em;
  }
}

/* V6.2 TARGETED RESPONSIVE FIX */

@media (min-width: 360px) and (max-width: 430px) {
  h1 {
    font-size: clamp(31px, 8.6vw, 37px);
    line-height: 1.02;
    letter-spacing: -.035em;
  }

  h1 span {
    overflow-wrap: anywhere;
  }

  .hero-copy > p {
    margin-top: 22px;
  }

  .hero-actions {
    margin-top: 32px;
  }

  .hero-visual {
    margin-bottom: 28px;
  }
}

@media (max-width: 359px) {
  h1 {
    font-size: 32px;
    line-height: 1.02;
  }

  h1 span {
    overflow-wrap: anywhere;
  }

  .hero-actions {
    margin-top: 30px;
  }

  .hero-visual {
    margin-bottom: 28px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .desktop-nav {
    color: #c0cad4;
  }

  .hero-copy > p {
    font-size: 18px;
    line-height: 1.7;
  }

  .hero-actions {
    gap: 18px;
  }
}

/* V6.3 VISUAL POLISH — NON STRUCTURAL */

.desktop-nav {
  color: #c7d0da;
}

.desktop-nav a {
  transition: color .18s ease, opacity .18s ease;
}

.desktop-nav a:hover {
  color: #ffffff;
}

.hero-copy > p {
  max-width: 620px;
  color: #aeb9c5;
}

.hero-actions {
  gap: 16px;
}

.button {
  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary:hover {
  background: var(--accent-2);
}

.button-secondary:hover {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
}

.project-card {
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,176,32,.24);
}

.profile-button {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

@media (max-width: 767px) {
  .hero-copy > p {
    color: #b2bdc8;
    line-height: 1.62;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-visual {
    position: relative;
    z-index: 1;
  }

  .mobile-nav {
    z-index: 100;
    box-shadow: 0 12px 40px rgba(0,0,0,.42);
  }

  .section-head {
    gap: 18px;
  }
}

/* V6 commercial brief modal */

body.modal-open {
  overflow: hidden;
}

.project-modal[hidden] {
  display: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 18, 0.78);
  backdrop-filter: blur(10px);
}

.project-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: #0b1422;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

#new-project-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

#new-project-form label {
  display: grid;
  gap: 8px;
  color: #d8e0e8;
  font-size: 14px;
}

#new-project-form select,
#new-project-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #101c2b;
  color: #fff;
  font: inherit;
}

.project-form-note {
  margin: 0;
  color: #9facb9;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 430px) {
  .project-modal {
    padding: 10px;
    align-items: end;
  }

  .project-modal-card {
    width: 100%;
    max-height: 90vh;
    padding: 24px 18px;
    border-radius: 24px 24px 16px 16px;
  }
}

/* V6 trial status */

.trial-status {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.trial-status h3 {
  margin: 8px 0 10px;
}

.trial-status p {
  margin: 0;
  color: #aeb9c5;
  line-height: 1.6;
}

.trial-project-id {
  margin-top: 16px;
  color: #c8d1db;
  font-size: 14px;
}

.trial-project-id strong {
  color: #fff;
}

.trial-status-badge {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,176,32,.12);
  color: #ffb020;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

