/* ===========================================================================
   Kedil Solutions — minimal editorial theme (black & white, studio style)
   Inspired by a stark digital-studio aesthetic. No build step, no deps.
   =========================================================================== */

:root {
  --black:   #000000;
  --white:   #ffffff;
  --paper:   #f4f2ee;   /* warm off-white for light sections */
  --ink:     #0b0b0b;
  --muted-d: #8c8c8c;   /* muted text on dark */
  --muted-l: #6a6a66;   /* muted text on light */
  --line-d:  rgba(255,255,255,.16);
  --line-l:  rgba(0,0,0,.14);

  --maxw:   1240px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    Arial, Helvetica, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 0.98; letter-spacing: -0.02em; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(72px, 12vw, 160px); position: relative; }
.sec--light { background: var(--paper); color: var(--ink); }
.sec--dark  { background: var(--black); color: var(--white); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted-d); display: inline-flex; align-items: center; gap: 12px;
}
.sec--light .eyebrow { color: var(--muted-l); }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted-d); max-width: 46ch; }
.sec--light .lead { color: var(--muted-l); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-body); font-weight: 700;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 15px 28px; border-radius: 999px; border: 1px solid;
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--solid-w { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--solid-w:hover { background: transparent; color: var(--white); }
.btn--line-w { background: transparent; color: var(--white); border-color: var(--line-d); }
.btn--line-w:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--solid-b { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--solid-b:hover { background: transparent; color: var(--black); }
.btn--line-b { background: transparent; color: var(--ink); border-color: var(--line-l); }
.btn--line-b:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* ---------- Header ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 60; }
.site-header.solid { position: sticky; background: rgba(0,0,0,.7); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-d); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand .mark { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.brand .wm { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--white); opacity: .72; transition: opacity .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-cta { display: inline-flex; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--black); min-height: 100svh; display: flex; align-items: center; padding-top: 92px; }
.hero .sphere { position: absolute; top: 50%; right: -6%; transform: translateY(-50%); width: min(760px, 82vw); opacity: .9; pointer-events: none; animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(-50%) } 50%{ transform: translateY(-54%) } }
.hero .container { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-size: clamp(3rem, 11vw, 9rem); font-weight: 600; letter-spacing: -.03em; text-transform: lowercase; }
.hero h1 em { font-style: italic; }
.hero .sub { margin-top: 28px; max-width: 40ch; font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted-d); }
.hero-cta { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.hero .meta-row { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-body); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-d); z-index: 2; }
.hero .meta-row span { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line-d); overflow: hidden; padding-block: 22px; background: var(--black); }
.marquee__track { display: inline-flex; gap: 44px; white-space: nowrap; animation: slide 26s linear infinite; will-change: transform; }
.marquee span { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-style: italic; color: var(--white); opacity: .9; }
.marquee span::after { content: "•"; margin-left: 44px; color: var(--muted-d); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Section head ---------- */
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.sec-head .lead { justify-self: end; }
@media (max-width: 780px){ .sec-head { grid-template-columns: 1fr; } .sec-head .lead { justify-self: start; } }

/* ---------- Services (editorial list) ---------- */
.svc { border-top: 1px solid var(--line-l); }
.sec--dark .svc { border-color: var(--line-d); }
.svc-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 24px; align-items: baseline; padding: clamp(24px, 3.4vw, 40px) 0; border-bottom: 1px solid var(--line-l); transition: padding-left .3s ease, background .3s ease; }
.sec--dark .svc-item { border-color: var(--line-d); }
.svc-item:hover { padding-left: 16px; }
.svc-num { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: var(--muted-l); }
.sec--dark .svc-num { color: var(--muted-d); }
.svc-title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 3rem); font-weight: 600; letter-spacing: -.02em; }
.svc-desc { font-family: var(--font-body); max-width: 34ch; color: var(--muted-l); font-size: .98rem; }
.sec--dark .svc-desc { color: var(--muted-d); }
@media (max-width: 720px){ .svc-item { grid-template-columns: 40px 1fr; } .svc-desc { grid-column: 2; margin-top: 6px; } }

/* ---------- Work / products ---------- */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
@media (max-width: 820px){ .work { grid-template-columns: 1fr; } }
.work-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 380px; padding: clamp(28px, 3vw, 44px); border: 1px solid var(--line-l); border-radius: 4px; overflow: hidden; background: var(--white); color: var(--ink); transition: transform .25s ease, background .25s ease, color .25s ease; }
.sec--dark .work-card { border-color: var(--line-d); background: #0e0e0e; color: var(--white); }
.work-card:hover { transform: translateY(-6px); background: var(--black); color: var(--white); }
.sec--dark .work-card:hover { background: var(--white); color: var(--black); }
.work-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work-mark { font-family: var(--font-display); font-weight: 600; font-size: 2rem; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; }
.work-tag { font-family: var(--font-body); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.work-body h3 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 28px; }
.work-body p { font-family: var(--font-body); margin-top: 14px; max-width: 42ch; opacity: .78; font-size: 1rem; }
.work-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 32px; padding-top: 22px; border-top: 1px solid currentColor; }
.work-foot .go { display: inline-flex; align-items: center; gap: .5em; font-family: var(--font-body); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.work-foot .go svg { transition: transform .15s ease; }
.work-foot .go:hover svg { transform: translate(3px,-3px); }
.work-foot .url { font-family: var(--font-body); font-size: .8rem; opacity: .55; letter-spacing: .04em; }
.work-feats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.work-feats li { font-family: var(--font-body); font-size: .92rem; opacity: .78; display: flex; gap: 10px; }
.work-feats li::before { content: "—"; opacity: .5; }

/* Coming soon (non-interactive) */
.work-card.is-soon { cursor: default; border-style: dashed; }
.work-card.is-soon:hover { transform: none; }
.sec--light .work-card.is-soon:hover { background: var(--white); color: var(--ink); }
.sec--dark .work-card.is-soon:hover { background: #0e0e0e; color: var(--white); }
.soon-badge { font-family: var(--font-body); font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; padding: 7px 13px; border-radius: 999px; border: 1px solid currentColor; opacity: .7; white-space: nowrap; }
.go--soon { opacity: .55; }
.footer-col .foot-soon { display: block; padding: 6px 0; opacity: .45; cursor: default; }

/* ---------- Big statement / CTA ---------- */
.statement { text-align: center; }
.statement h2 { font-size: clamp(2.6rem, 9vw, 8rem); text-transform: lowercase; letter-spacing: -.03em; }
.statement h2 em { font-style: italic; }
.statement .hero-cta { justify-content: center; margin-top: 44px; }
.statement p { margin: 20px auto 0; max-width: 48ch; color: var(--muted-d); }
.sec--light .statement p { color: var(--muted-l); }

/* ---------- Page hero (inner) ---------- */
.page-hero { background: var(--black); color: var(--white); padding-top: 92px; }
.page-hero .container { padding-block: clamp(72px, 12vw, 150px); }
.page-hero h1 { font-size: clamp(3rem, 10vw, 7.5rem); text-transform: lowercase; letter-spacing: -.03em; }
.page-hero .lead { margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding-block: clamp(64px, 9vw, 120px) 40px; border-top: 1px solid var(--line-d); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line-d); }
.footer-big { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.02em; text-transform: lowercase; }
.footer-col h4 { font-family: var(--font-body); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-d); margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; opacity: .8; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { margin-top: 34px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-body); font-size: .78rem; letter-spacing: .06em; color: var(--muted-d); }
@media (max-width: 780px){ .footer-top { grid-template-columns: 1fr 1fr; } .footer-big { grid-column: 1 / -1; } }

/* ---------- Rotating badge ---------- */
.badge-spin { position: fixed; right: clamp(16px, 3vw, 34px); bottom: clamp(16px, 3vw, 34px); width: 116px; height: 116px; z-index: 40; display: grid; place-items: center; }
.badge-spin .ring { position: absolute; inset: 0; animation: spin 16s linear infinite; }
.badge-spin .ring text { font-family: var(--font-body); font-size: 8.4px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; fill: var(--white); }
.badge-spin .disc { grid-area: 1 / 1; place-self: center; width: 58px; height: 58px; border-radius: 50%; background: var(--white); }
.badge-spin .ico { grid-area: 1 / 1; place-self: center; position: relative; z-index: 1; color: var(--black); }
.badge-spin.on-light .ring text { fill: var(--black); }
.badge-spin.on-light .disc { background: var(--black); }
.badge-spin.on-light .ico { color: var(--white); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px){ .badge-spin { display: none; } }

/* ---------- 404 ---------- */
.notfound { min-height: 74vh; display: grid; place-items: center; text-align: center; }
.notfound .code { font-family: var(--font-display); font-size: clamp(5rem, 20vw, 12rem); line-height: .9; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero .sphere { right: -20%; opacity: .5; width: min(620px, 92vw); }
  .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce){
  .hero .sphere, .badge-spin .ring, .marquee__track { animation: none; }
}
