import os, base64

# Read assets
with open('/home/claude/hero_b64.txt') as f: HERO = f.read().strip()
with open('/home/claude/logo_b64.txt') as f: LOGO = f.read().strip()

HERO_SRC = f"data:image/jpeg;base64,{HERO}"
LOGO_SRC = f"data:image/jpeg;base64,{LOGO}"

OUT = "/home/claude/ebonsoft_site"
os.makedirs(OUT, exist_ok=True)

# ─────────────────────────────────────────────────────────────────────────────
# SHARED CSS — Midnight Velvet theme
# ─────────────────────────────────────────────────────────────────────────────
CSS = """/* ═══════════════════════════════════════════════════
   EBONSOFT — MIDNIGHT VELVET THEME
   Global Stylesheet
═══════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; cursor: pointer; }

/* ── VARIABLES ── */
:root {
  --bg:     #06091a;
  --bg2:    #080c22;
  --bg3:    #0a1030;
  --sur:    #0e163c;
  --brd:    rgba(212,175,90,0.12);
  --brd2:   rgba(212,175,90,0.22);
  --g1:     #d4af5a;
  --g2:     #eddfa0;
  --g3:     #8a6c28;
  --g4:     #faf2d8;
  --n1:     #06091a;
  --txt:    #c8c0b0;
  --txt2:   #706860;
  --txt3:   #383028;
  --hh:     #f8f0e0;
  --bt:     #06091a;
  --ff:     'Cormorant Garamond', serif;
  --fd:     'Cormorant Garamond', serif;
  --fb:     'Cormorant Garamond', serif;
  --nav-h:  70px;
  --nb:     rgba(6,9,26,0.97);
  --card:   #080c22;
  --ch:     #0a1030;
  --ease:   cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 20px 80px rgba(212,175,90,0.12);
}

/* ── BODY ── */
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--fb);
  min-height: 100vh;
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s;
}
.nav.stuck {
  background: var(--nb);
  border-color: var(--brd);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-logo { height: 40px; width: auto; object-fit: contain; display: block; }

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  font-family: var(--ff);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--txt2);
  position: relative;
  transition: color 0.3s;
}
.nav-links a.active { color: var(--g1); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1px;
  background: var(--g1);
  transition: right 0.4s var(--ease);
}
.nav-links a:hover { color: var(--g1); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }

.nav-socs { display: flex; gap: 16px; align-items: center; }
.nav-socs a { color: var(--txt2); transition: color 0.3s; display: flex; }
.nav-socs a:hover { color: var(--g1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bt);
  background: var(--g1);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--g2); box-shadow: 0 4px 20px rgba(212,175,90,0.3); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--txt);
  transition: transform 0.4s var(--ease), opacity 0.4s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(6,9,26,0.99);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--brd);
  padding: 28px 32px 36px;
  flex-direction: column;
  gap: 20px;
  z-index: 499;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.mobile-nav a {
  font-family: var(--ff);
  font-size: 18px;
  font-style: italic;
  color: var(--txt);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--brd);
  transition: color 0.3s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--g1); }

/* ── PAGE WRAPPER ── */
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; }

/* ── SECTION LABELS ── */
.sec-ey {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--g1);
  margin-bottom: 14px;
  font-style: normal;
}
.sec-h {
  font-family: var(--fd);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 400;
  font-style: italic;
  color: var(--hh);
  margin-bottom: 20px;
  line-height: 1.12;
}
.sec-div {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--g1), transparent);
  margin-bottom: 40px;
}
.sec-p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  color: var(--txt2);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 38px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.35s var(--ease);
  font-style: normal;
}
.btn-primary {
  background: var(--g1);
  color: var(--bt);
}
.btn-primary:hover {
  background: var(--g2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--g1);
  border: 1px solid rgba(212,175,90,0.35);
}
.btn-ghost:hover {
  background: rgba(212,175,90,0.07);
  border-color: var(--g1);
  transform: translateY(-2px);
}
.btn-dark {
  background: rgba(255,255,255,0.06);
  color: var(--g1);
  border: 1px solid rgba(212,175,90,0.25);
  backdrop-filter: blur(8px);
}
.btn-dark:hover {
  background: rgba(212,175,90,0.1);
  transform: translateY(-2px);
}

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  background: linear-gradient(135deg,
    var(--bg2) 0%,
    var(--bg3) 60%,
    var(--bg2) 100%);
  border-bottom: 1px solid var(--brd);
  padding: 80px 56px 72px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40%;
  background: radial-gradient(ellipse 80% 100% at 100% 50%,
    rgba(212,175,90,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero .sec-ey { margin-bottom: 16px; }
.page-hero h1 {
  font-family: var(--fd);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  font-style: italic;
  color: var(--hh);
  line-height: 1;
  margin-bottom: 20px;
}
.page-hero p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--txt2);
  max-width: 560px;
}

/* ── CARD COMPONENT ── */
.card {
  background: var(--card);
  border: 1px solid var(--brd);
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--brd2);
}

/* ── NEWS CARD ── */
.news-card {
  background: var(--card);
  border: 1px solid var(--brd);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.news-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px; width: 100%;
  background: var(--g1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.news-card:hover { background: var(--ch); box-shadow: var(--shadow); }
.news-card:hover::after { transform: scaleX(1); }
.news-card .cat {
  font-family: 'Cinzel', serif;
  font-size: 9px; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--g1); margin-bottom: 12px;
}
.news-card h3 {
  font-family: var(--fd);
  font-size: 20px; font-weight: 400; font-style: italic;
  color: var(--hh); line-height: 1.3; margin-bottom: 12px;
  transition: color 0.3s;
}
.news-card:hover h3 { color: var(--g1); }
.news-card p {
  font-size: 14px; line-height: 1.8; color: var(--txt2);
  flex: 1; margin-bottom: 20px;
}
.news-card .date {
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.1em; color: var(--txt3);
}
.news-card .arrow {
  position: absolute; bottom: 28px; right: 28px;
  width: 28px; height: 28px;
  border: 1px solid var(--brd);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--txt3);
  transition: all 0.3s;
}
.news-card:hover .arrow {
  background: var(--g1); border-color: var(--g1);
  color: var(--bt); transform: translate(2px, -2px);
}

/* ── GRID UTILITIES ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--brd); border: 1px solid var(--brd); }
.inner { max-width: 1100px; margin: 0 auto; }

/* ── SECTION SPACING ── */
.section { padding: 100px 56px; }
.section-sm { padding: 70px 56px; }
.section-lg { padding: 130px 56px; }
.bg-alt { background: var(--bg2); border-top: 1px solid var(--brd); border-bottom: 1px solid var(--brd); }
.bg-deep { background: var(--bg3); }

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid var(--brd); margin: 0; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Cinzel', serif; font-size: 9px; font-style: normal;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--g1);
  background: rgba(212,175,90,0.08);
  border: 1px solid rgba(212,175,90,0.2);
  padding: 5px 13px;
}
.badge::before {
  content: ''; width: 5px; height: 5px;
  background: var(--g1); border-radius: 50%;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── REVEAL ANIMATIONS ── */
.rev {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.rev.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.12s; }
.d2 { transition-delay: 0.24s; }
.d3 { transition-delay: 0.36s; }
.d4 { transition-delay: 0.48s; }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--brd);
  padding: 72px 56px 40px;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-logo { height: 44px; width: auto; object-fit: contain; margin-bottom: 18px; }
.footer-tagline {
  font-size: 14px; line-height: 1.85; color: var(--txt2); margin-bottom: 26px;
}
.footer-socs { display: flex; gap: 10px; }
.footer-soc {
  width: 34px; height: 34px;
  border: 1px solid var(--brd);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt3); font-size: 13px;
  transition: all 0.3s;
}
.footer-soc:hover { border-color: var(--g1); color: var(--g1); }
.footer-col h4 {
  font-family: 'Cinzel', serif; font-size: 10px; font-style: normal;
  font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--g2); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a {
  font-size: 14px; color: var(--txt2);
  transition: color 0.3s, padding-left 0.3s; display: block;
}
.footer-col ul a:hover { color: var(--g1); padding-left: 6px; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--brd); padding-top: 28px;
  flex-wrap: wrap; gap: 14px;
}
.footer-bottom p, .footer-bottom a { font-size: 12px; color: var(--txt3); letter-spacing: 0.05em; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--g1); }

/* ── FORM ELEMENTS ── */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.form-label {
  font-family: 'Cinzel', serif; font-size: 9px; font-style: normal;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--g1);
}
.form-input, .form-textarea, .form-select {
  background: var(--bg3);
  border: 1px solid var(--brd);
  color: var(--txt);
  font-family: var(--fb); font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
  appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 1px rgba(212,175,90,0.15);
}
.form-textarea { min-height: 140px; resize: vertical; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--txt3); }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Cinzel', serif; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--txt3);
  margin-bottom: 24px; font-style: normal;
}
.breadcrumb a { color: var(--txt3); transition: color 0.3s; }
.breadcrumb a:hover { color: var(--g1); }
.breadcrumb .sep { color: var(--txt3); opacity: 0.4; }
.breadcrumb .current { color: var(--g1); }

/* ── TAG PILL ── */
.tag {
  font-family: 'Cinzel', serif; font-size: 9px; font-style: normal;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--txt3); padding: 5px 12px;
  border: 1px solid var(--brd); background: var(--bg3);
  transition: all 0.3s; cursor: pointer;
}
.tag:hover, .tag.active { border-color: var(--g1); color: var(--g1); background: rgba(212,175,90,0.06); }

/* ── STORE PRODUCT CARD ── */
.product-card {
  background: var(--card);
  border: 1px solid var(--brd);
  overflow: hidden;
  transition: all 0.4s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow); border-color: var(--brd2); transform: translateY(-4px); }
.product-img {
  aspect-ratio: 1;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-info { padding: 22px 20px; }
.product-cat {
  font-family: 'Cinzel', serif; font-size: 9px; font-style: normal;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--g1); margin-bottom: 8px;
}
.product-name {
  font-family: var(--fd); font-size: 17px; font-style: italic; font-weight: 400;
  color: var(--hh); margin-bottom: 10px; line-height: 1.3;
}
.product-price {
  font-family: 'Cinzel', serif; font-size: 14px; font-style: normal;
  font-weight: 600; color: var(--g1); letter-spacing: 0.06em;
}
.product-price .was {
  font-size: 11px; color: var(--txt3); text-decoration: line-through; margin-right: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-news { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .nav-links, .nav-socs, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .section, .section-sm, .section-lg { padding-left: 24px; padding-right: 24px; }
  .page-hero { padding: 60px 24px 56px; }
  .site-footer { padding: 56px 24px 32px; }
  .grid-2, .grid-3, .grid-news { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
"""

with open(f"{OUT}/style.css", "w") as f:
    f.write(CSS)
print("style.css written")
