/* ceresemil.com — OLED black, no borders, motion-first */

:root {
  --bg:     #000;
  --fg:     #f0ede8;
  --muted:  #555;
  --accent: #cfcfcf;
  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;
  --max:    1200px;
  --pad:    clamp(1.5rem, 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(15px, 1.45vw, 17px);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(200,200,200,.2); }

/* ---- starfield ---- */
#stars {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: .92;
}

/* ---- cursor ---- */
.cursor-dot {
  position: fixed; z-index: 999; pointer-events: none;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  top: -2.5px; left: -2.5px;
  will-change: transform;
  mix-blend-mode: screen;
  transition: opacity .3s, width .3s, height .3s;
}
.cursor-ring {
  position: fixed; z-index: 998; pointer-events: none;
  width: 28px; height: 28px; border-radius: 50%;
  top: -14px; left: -14px;
  will-change: transform;
  background: radial-gradient(circle, rgba(200,200,200,.12) 0%, transparent 70%);
  transition: opacity .3s;
}
body:not(.has-hover) .cursor-dot,
body:not(.has-hover) .cursor-ring { opacity: 0; }

/* ---- nav ---- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.35rem var(--pad);
  transition: background .4s;
}
#nav.scrolled {
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.logo {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--serif); font-size: 1rem; font-weight: 400;
  letter-spacing: .06em; color: var(--fg);
  transition: opacity .3s;
}
.logo:hover { opacity: .7; }

.nav-links { display: flex; align-items: center; gap: 2.4rem; }

.nav-links a {
  font-size: .7rem; font-weight: 400; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted);
  position: relative; transition: color .3s;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -.15rem; left: 0; right: 0;
  height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-links a.cta { color: var(--accent); }
.nav-links a.cta::after { background: var(--accent); }

/* ---- hero ---- */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad) clamp(5rem, 8vw, 8rem);
  overflow: hidden;
}

.hero-orbit {
  position: absolute; top: 50%; right: -6%;
  transform: translateY(-50%);
  width: min(68vw, 760px); height: min(68vw, 760px);
  pointer-events: none; opacity: .18;
  will-change: translate;
  animation: float 9s ease-in-out infinite;
}
.hero-orbit .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--accent);
  animation: spin 24s linear infinite;
}
.hero-orbit .ring::after {
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px var(--accent);
}
.hero-orbit .ring-2 {
  inset: 9%;
  border-color: rgba(200,200,200,.55);
  animation: spin 40s linear infinite reverse;
}
.hero-orbit .ring-2::after { width: 4px; height: 4px; top: -2px; }
.hero-orbit .planet {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 13%; height: 13%; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ededed, #8a8a8a 55%, #2a2a2a);
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(-50%) translateY(0);} 50% { transform: translateY(-50%) translateY(-22px); } }
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 30px rgba(200,200,200,.35); }
  50%      { box-shadow: 0 0 60px rgba(200,200,200,.6); }
}

/* hero text reveal */
.hero-eyebrow {
  position: absolute; top: 5rem; left: var(--pad);
  font-size: .66rem; font-weight: 500; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted);
  opacity: 0;
  transition: opacity .8s ease .1s;
}
body.hero-ready .hero-eyebrow { opacity: 1; }

.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(4.2rem, 10.5vw, 10.5rem);
  line-height: .98; letter-spacing: -.03em;
  color: var(--fg); margin-bottom: 2.8rem;
}
.h1-line { display: block; overflow: hidden; }
.h1-inner { display: block; transform: translateY(110%); will-change: transform; }
.h1-em { display: block; font-style: italic; color: var(--accent); font-weight: 300; }

/* transition applied by JS once ready */
body.hero-ready .h1-inner {
  transform: translateY(0);
  transition: transform .9s cubic-bezier(.16,1,.3,1);
}
body.hero-ready .h1-line:nth-child(1) .h1-inner { transition-delay: .05s; }
body.hero-ready .h1-em .h1-line:nth-child(1) .h1-inner { transition-delay: .2s; }
body.hero-ready .h1-em .h1-line:nth-child(2) .h1-inner { transition-delay: .32s; }

.hero-sub {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
body.hero-ready .hero-sub { opacity: 1; transform: none; }
body.hero-ready .tagline.hero-sub  { transition-delay: .55s; }
body.hero-ready .actions.hero-sub  { transition-delay: .7s; }

.tagline {
  font-size: clamp(.86rem, 1.35vw, 1rem);
  color: var(--muted); line-height: 1.85;
  margin-bottom: 3rem; max-width: 46ch;
}

/* ---- buttons — NO borders, NO backgrounds ---- */
.actions { display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0;
  font-size: .7rem; font-weight: 400; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
  transition: color .3s, gap .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.btn-primary { color: var(--accent); }
.btn-ghost   { color: var(--fg); }

.btn-arrow {
  display: inline-block; opacity: 0;
  transform: translateX(-6px);
  transition: opacity .35s, transform .35s cubic-bezier(.4,0,.2,1);
  font-style: normal;
}
.btn:hover { gap: .55rem; }
.btn:hover .btn-arrow { opacity: 1; transform: translateX(0); }
.btn-primary:hover { color: var(--fg); }
.btn-ghost:hover   { color: var(--accent); }

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 2.2rem; left: var(--pad);
  font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); animation: bob 2.8s ease-in-out infinite;
  opacity: 0; transition: opacity .6s ease 1.4s;
}
body.hero-ready .scroll-hint { opacity: 1; }
@keyframes bob { 0%,100%{transform:translateY(0);}50%{transform:translateY(8px);} }

/* ---- section layout ---- */
.services, .about, .contact {
  position: relative; z-index: 1;
  padding: clamp(6rem, 11vw, 11rem) var(--pad);
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
}

.kicker {
  font-size: .66rem; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.4rem;
  opacity: 0; transform: translateX(-12px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible .kicker { opacity: 1; transform: none; }

h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.04; letter-spacing: -.025em;
  will-change: transform;
}

.section-intro {
  color: var(--muted); font-size: clamp(.86rem, 1.3vw, 1rem);
  max-width: 50ch; margin-top: .9rem; margin-bottom: 5rem; line-height: 1.85;
}

/* ---- scroll reveal — skewed ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px) skewY(.6deg);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1),
              transform .9s cubic-bezier(.2,.6,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0) skewY(0deg); }

/* ---- services — NO dividers ---- */
.service-list { list-style: none; }

.service-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 2rem; align-items: start;
  padding: 2.2rem 0;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.service-item:hover { transform: translateX(10px); }

.service-num {
  font-family: var(--serif); font-size: .95rem; font-weight: 300;
  color: var(--accent); letter-spacing: .06em;
  padding-top: .3rem; opacity: .55;
  transition: opacity .4s, transform .4s, color .4s;
  will-change: transform;
}
.service-item:hover .service-num {
  opacity: 1;
  color: var(--fg);
  transform: scale(1.12) translateX(-2px);
}

.service-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 400; letter-spacing: -.015em;
  margin-bottom: .55rem; line-height: 1.2;
  transition: color .4s, letter-spacing .4s;
}
.service-item:hover .service-body h3 {
  color: var(--accent);
  letter-spacing: -.005em;
}
.service-body p {
  color: var(--muted); font-size: .88rem; line-height: 1.8; max-width: 56ch;
}

/* ---- about ---- */
.about-inner {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(3rem, 8vw, 10rem); align-items: center;
  margin-bottom: 4rem;
}
.about-text h2 { margin-bottom: 1.8rem; }
.about-text p {
  color: rgba(240,237,232,.65); margin-bottom: 1.2rem;
  font-size: clamp(.88rem, 1.3vw, 1rem); line-height: 1.85; max-width: 52ch;
}
.about-text strong { color: var(--fg); font-weight: 500; }

.about-visual {
  position: relative; width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  will-change: translate;
}

.ceres {
  width: min(210px, 52vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #e4e4e4, #909090 40%, #3a3a3a 74%, #121212 100%);
  box-shadow: 0 0 80px rgba(200,200,200,.2), inset -12px -14px 36px rgba(0,0,0,.55);
  position: relative; z-index: 1;
  animation: pulse-glow 6s ease-in-out infinite;
}
.ceres::before {
  content: ''; position: absolute; border-radius: 50%;
  width: 17%; height: 17%; top: 28%; left: 26%;
  background: rgba(10,10,10,.42);
}
.ceres::after {
  content: ''; position: absolute; border-radius: 50%;
  width: 10%; height: 10%; top: 56%; left: 59%;
  background: rgba(10,10,10,.38);
}

.ceres-ring {
  position: absolute; top: 50%; left: 50%;
  width: min(320px, 76vw); aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  border: 1px dashed rgba(200,200,200,.18);
  animation: spin 46s linear infinite;
}

.about-caption {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); padding-top: 2rem;
}

/* ---- contact ---- */
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 10rem); align-items: start;
}
.contact-info h2 { margin-bottom: 1.4rem; }
.contact-info > p {
  color: var(--muted); max-width: 40ch; margin-bottom: 2.8rem;
  font-size: clamp(.88rem, 1.3vw, 1rem); line-height: 1.85;
}
.contact-meta { display: flex; flex-direction: column; gap: .55rem; }
.contact-meta a {
  color: var(--accent); font-size: .9rem;
  position: relative; display: inline-block;
  transition: opacity .3s;
}
.contact-meta a::after {
  content: ''; position: absolute; bottom: -.1rem; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.contact-meta a:hover::after { transform: scaleX(1); transform-origin: left; }
.contact-meta span { color: var(--muted); font-size: .84rem; }

/* ---- form — NO borders at rest ---- */
form { display: flex; flex-direction: column; gap: 0; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }

.field {
  position: relative;
  margin-top: 2rem;
}

form label {
  display: block;
  font-size: .66rem; font-weight: 500; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: .45rem;
  transition: color .3s;
}
.field:focus-within label { color: var(--accent); }

form input, form textarea {
  width: 100%; background: transparent;
  border: none; outline: none;
  color: var(--fg); font-family: var(--sans);
  font-size: .95rem; font-weight: 300;
  padding: .65rem 0; border-radius: 0;
  -webkit-appearance: none;
  transition: color .3s;
}
form textarea { resize: vertical; min-height: 110px; }
form input::placeholder, form textarea::placeholder {
  color: var(--muted); opacity: .45;
}

/* animated underline on focus — no border at rest */
.field-line {
  display: block; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.field:focus-within .field-line { transform: scaleX(1); }

/* submit button — NO border */
form button {
  align-self: flex-start; margin-top: 2.5rem;
  background: transparent; border: none; outline: none;
  display: inline-flex; align-items: center; gap: 0;
  color: var(--accent); font-family: var(--sans);
  font-size: .7rem; font-weight: 400; letter-spacing: .18em;
  text-transform: uppercase; padding: 0; cursor: pointer;
  transition: color .3s, gap .35s cubic-bezier(.4,0,.2,1);
}
form button .btn-arrow {
  display: inline-block; opacity: 0;
  transform: translateX(-6px);
  transition: opacity .35s, transform .35s cubic-bezier(.4,0,.2,1);
  font-style: normal;
}
form button:hover { gap: .55rem; color: var(--fg); }
form button:hover .btn-arrow { opacity: 1; transform: translateX(0); }
form button:disabled { opacity: .4; cursor: wait; }

.form-status {
  margin-top: 1.2rem; font-size: .84rem; min-height: 1.4em; color: var(--muted);
}
.form-status.success { color: #7de8b4; }
.form-status.error   { color: #ff9eae; }

/* ---- footer — NO border ---- */
footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding: 2.5rem var(--pad);
  font-size: .76rem; color: var(--muted);
}
.foot-logo {
  font-family: var(--serif); font-size: .95rem; font-weight: 400;
  color: var(--fg); letter-spacing: .06em;
}
.foot-meta { display: flex; gap: 2rem; flex-wrap: wrap; }
.foot-meta a { transition: color .3s; }
.foot-meta a:hover { color: var(--fg); }

/* ---- parallax title (scroll-driven via JS) ---- */
.parallax-title { will-change: transform; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-visual { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 640px) {
  #nav { display: none; }
  .hero h1 { font-size: clamp(3.4rem, 15vw, 5.5rem); }
  .hero-orbit { right: 0; transform: translateX(35%) translateY(-50%); opacity: .1; }
  .service-item { grid-template-columns: 2.8rem 1fr; gap: 1rem; }
  .foot-meta { flex-direction: column; gap: .4rem; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-sub, .hero-eyebrow, .h1-inner, .kicker {
    opacity: 1; transform: none; transition: none;
  }
  .ring, .ring-2, .ceres-ring, .scroll-hint, .hero-orbit, .ceres, .planet {
    animation: none !important;
  }
  body.hero-ready .h1-inner { transform: none; transition: none; }
}
