/* Home page — "Ember Room" redesign (Figma: Ana sayfa — final). Dark-only. */

#work,
#studio,
#services,
#lab,
#loop,
#contact {
  scroll-margin-top: 84px;
}

.wrap {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 48px;
  }
}

main .section-index {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--brand);
}

main .section-index.is-center {
  text-align: center;
}

.v2-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.v2-title.is-center {
  text-align: center;
}

@media (min-width: 768px) {
  .v2-title {
    font-size: clamp(44px, 4.45vw, 64px);
  }
  .v2-title.is-md {
    font-size: clamp(36px, 3.9vw, 56px);
    line-height: 1.04;
  }
}

.v2-title.is-md {
  font-size: 36px;
  line-height: 1.06;
}

@media (min-width: 768px) {
  .v2-title.is-md {
    font-size: clamp(36px, 3.9vw, 56px);
  }
}

/* ---------- Hero tuning ---------- */
.hero-inner {
  max-width: 90rem;
}

@media (min-width: 1024px) {
  .hero {
    padding: 7rem 3rem 7rem;
  }
}

.hero-title {
  font-size: clamp(3.4rem, 15.8vw, 6.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: clamp(4rem, 7.2vw, 6.5rem);
  }
}

.hero-sub {
  max-width: min(540px, 42vw);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
}

.hero-cta {
  padding: 13px 22px;
  font-weight: 500;
}

.hero-restart {
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
}

.hero-restart:hover,
.hero-restart:focus-visible {
  border-color: rgba(255, 105, 0, 0.7);
  color: #ffffff;
}

@media (max-width: 1023px) {
  .hero {
    padding-top: calc(70px + 4svh + min(84vw, 440px) + 1.25rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-cta,
  .hero-restart {
    justify-content: center;
  }
}

/* ---------- Work ---------- */
.work {
  padding: 56px 0 64px;
}

@media (min-width: 768px) {
  .work {
    padding: 100px 0;
  }
}

.v2-head {
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .v2-head {
    margin-bottom: 44px;
  }
}

.work-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-row {
  display: flex;
  gap: 16px;
}

.work-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 300px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  flex: 1 1 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #0c0c0c;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.work-card.is-xl {
  height: 400px;
  padding: 36px;
  flex: 836 1 0;
}

.work-card.is-xl.is-narrow {
  flex: 492 1 0;
}

a.work-card:hover,
a.work-card:focus-visible {
  border-color: rgba(255, 105, 0, 0.55);
  transform: translateY(-3px);
}

a.work-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Card with a second link: the cover link fills the card, sublinks sit above it. */
.work-card.has-links:hover,
.work-card.has-links:focus-within {
  border-color: rgba(255, 105, 0, 0.55);
  transform: translateY(-3px);
}

.work-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.work-cover:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.work-card.has-links .work-bottom {
  z-index: 3;
  pointer-events: none;
}

.work-sublink {
  position: relative;
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  text-transform: uppercase;
}

.work-sublink:hover,
.work-sublink:focus-visible {
  color: var(--brand);
}

.work-card.is-glow::before {
  content: "";
  position: absolute;
  top: -161px;
  left: 16px;
  width: 560px;
  height: 560px;
  background: radial-gradient(closest-side, rgba(255, 105, 0, 0.3), rgba(255, 105, 0, 0.1) 55%, rgba(255, 105, 0, 0));
  pointer-events: none;
}

.work-top,
.work-bottom {
  position: relative;
  z-index: 1;
  display: flex;
}

.work-top {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.work-bottom {
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.work-logo {
  display: flex;
  height: 64px;
  width: 64px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #ffffff;
  object-fit: cover;
}

.work-card.is-xl .work-logo {
  height: 96px;
  width: 96px;
  border-radius: 21px;
}

.work-logo.is-light {
  object-fit: contain;
}

.work-logo.is-utility {
  background: linear-gradient(180deg, #ff8a33, #e24a00);
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 500;
  color: #050505;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.work-tag,
.work-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.35);
}

.work-status {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.5);
}

.work-status i {
  display: block;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #9a9a9a;
}

.work-status.is-live i {
  background: #2bd96b;
}

.work-status.is-soon i {
  background: #ff9a3d;
}

.work-status.is-review i {
  background: #f5c542;
}

.work-tag-b {
  display: none;
}

.work-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.work-card.is-xl .work-name {
  font-size: 52px;
  letter-spacing: -0.015em;
}

.work-desc {
  max-width: 300px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.work-card.is-xl .work-desc {
  max-width: 400px;
  font-size: 18px;
  line-height: 1.5;
}

.work-card.is-xl.is-narrow .work-desc {
  max-width: 260px;
}

.work-card[href="./cozmece/"] .work-desc {
  max-width: 230px;
}

.work-dots {
  display: none;
}

@media (min-width: 768px) and (max-width: 1099px) {
  .work-row {
    flex-wrap: wrap;
  }

  .work-card,
  .work-card.is-xl,
  .work-card.is-xl.is-narrow {
    flex: 1 1 calc(50% - 8px);
  }

  .work-card.is-xl {
    flex-basis: 100%;
  }
}

@media (max-width: 767px) {
  .work-rail {
    flex-direction: row;
    gap: 12px;
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    scrollbar-width: none;
  }

  .work-row {
    display: contents;
  }

  .work-rail::-webkit-scrollbar {
    display: none;
  }

  .work-card,
  .work-card.is-xl,
  .work-card.is-xl.is-narrow {
    height: 360px;
    width: 286px;
    flex: none;
    padding: 23px;
    scroll-snap-align: start;
  }

  .work-card.is-xl .work-logo {
    height: 64px;
    width: 64px;
    border-radius: 14px;
  }

  .work-top .work-tag {
    display: none;
  }

  .work-tag-b {
    display: inline-flex;
  }

  .work-name,
  .work-card.is-xl .work-name {
    font-size: 32px;
    line-height: 1.2;
  }

  .work-desc,
  .work-card.is-xl .work-desc,
  .work-card.is-xl.is-narrow .work-desc,
  .work-card[href="./cozmece/"] .work-desc {
    max-width: 240px;
    font-size: 14px;
    line-height: 1.45;
  }

  .work-dots {
    display: flex;
    gap: 6px;
    margin-top: 24px;
  }

  .work-dots i {
    display: block;
    height: 6px;
    width: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.25s ease, background 0.25s ease;
  }

  .work-dots i.is-active {
    width: 20px;
    background: var(--brand);
  }
}

/* ---------- Studio ---------- */
.studio-v2 {
  padding: 56px 0 24px;
  background: #0a0a0a;
}

@media (min-width: 1024px) {
  .studio-v2 {
    padding: 110px 0;
  }
}

.studio-v2-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .studio-v2-grid {
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: 64px;
  }
}

.studio-v2 .v2-title {
  max-width: 470px;
}

.studio-v2-body {
  max-width: 480px;
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .studio-v2-body {
    font-size: 17px;
    line-height: 1.6;
  }
}

.service-grid {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card::after {
  content: "\2197";
  margin-left: auto;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.4);
}

.service-no {
  min-width: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
}

.service-t {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-t strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
}

.service-t em {
  font-size: 13px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .service-card {
    height: 170px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: #111111;
  }

  .service-card::after {
    content: none;
  }

  .service-t {
    gap: 6px;
  }

  .service-t strong {
    font-size: 24px;
  }

  .service-t em {
    font-size: 14px;
  }
}

/* ---------- Loop ---------- */
.loop-v2 {
  padding: 56px 0 64px;
}

@media (min-width: 768px) {
  .loop-v2 {
    padding: 100px 0 110px;
  }
}

.loop-ring {
  display: grid;
  max-width: 900px;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin: 32px auto 0;
}

.loop-svg {
  display: block;
  width: min(280px, 78vw);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.loop-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.loop-ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 817;
  stroke-dashoffset: 817;
  filter: drop-shadow(0 0 6px rgba(255, 105, 0, 0.6));
}

.loop-arrow-head {
  fill: var(--brand);
}

.loop-n-ring {
  fill: #0c0c0c;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.2;
}

.loop-n-text {
  fill: rgba(255, 255, 255, 0.45);
  font-family: var(--font-mono);
  font-size: 13px;
  text-anchor: middle;
}

.loop-hub-ring {
  fill: #050505;
  stroke: var(--brand);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 14px rgba(255, 105, 0, 0.45));
}

.loop-orbit {
  transform-origin: 170px 170px;
  opacity: 0;
}

.loop-orbit circle {
  fill: #ffb27a;
  filter: drop-shadow(0 0 8px rgba(255, 105, 0, 0.95));
}

.loop-ring.is-on .loop-ring-fill {
  animation: ringDraw 2.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.loop-ring.is-on .loop-n-ring {
  animation: ringNodeOn 0.6s ease forwards;
  animation-delay: calc(var(--n, 0) * 0.6s + 0.3s);
}

.loop-ring.is-on .loop-n-text {
  animation: ringNumOn 0.6s ease forwards;
  animation-delay: calc(var(--n, 0) * 0.6s + 0.3s);
}

.loop-ring.is-on .loop-orbit {
  animation: ringOrbit 9s linear 3s infinite;
  opacity: 1;
}

.loop-n:nth-of-type(1) { --n: 0; }
.loop-n:nth-of-type(2) { --n: 1; }
.loop-n:nth-of-type(3) { --n: 2; }
.loop-n:nth-of-type(4) { --n: 3; }

.loop-steps-v2 {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 22px;
}

.loop-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 14px;
}

.loop-no {
  grid-row: span 2;
  align-self: start;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
}

.loop-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.loop-desc {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.loop-note {
  margin: 28px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.loop-note span {
  color: var(--brand);
}

@keyframes ringDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes ringNodeOn {
  to {
    stroke: var(--brand);
    fill: #1a0d03;
  }
}

@keyframes ringNumOn {
  to { fill: var(--brand); }
}

@keyframes ringOrbit {
  to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .loop-ring {
    grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr);
    grid-template-rows: 170px 170px;
    column-gap: 28px;
    margin-top: 56px;
  }

  .loop-svg {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 340px;
  }

  .loop-steps-v2 {
    display: contents;
  }

  .loop-step {
    display: flex;
    flex-direction: column;
    align-self: center;
    max-width: 300px;
  }

  .loop-no {
    display: none;
  }

  .loop-step:nth-child(1) { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
  .loop-step:nth-child(2) { grid-column: 3; grid-row: 1; justify-self: start; }
  .loop-step:nth-child(3) { grid-column: 3; grid-row: 2; justify-self: start; }
  .loop-step:nth-child(4) { grid-column: 1; grid-row: 2; justify-self: end; text-align: right; }

  .loop-label {
    font-size: 24px;
  }

  .loop-desc {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loop-ring-fill {
    stroke-dashoffset: 0;
  }

  .loop-orbit {
    display: none;
  }
}

/* ---------- Contact ---------- */
.contact-v2 {
  position: relative;
  overflow: hidden;
  padding: 100px 0 110px;
  isolation: isolate;
}

@media (min-width: 768px) {
  .contact-v2 {
    padding: 125px 0 125px;
  }
}

.contact-glow {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: min(800px, 140vw);
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 105, 0, 0.26), rgba(255, 105, 0, 0.08) 60%, rgba(255, 105, 0, 0));
  pointer-events: none;
}

.contact-v2-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.contact-v2-inner .section-index {
  margin: 0;
}

.contact-title {
  max-width: 900px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11.5vw, 5.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.contact-btn {
  padding: 15px 26px;
  font-size: 16px;
}

/* Art that spreads across the card like light from a screen */
.work-spread {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 78%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
}

.work-spread::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  opacity: 0.55;
}

.work-spread.is-sizzleai {
  background:
    radial-gradient(60% 75% at 88% 18%, rgba(255, 150, 40, 0.85), rgba(255, 150, 40, 0) 70%),
    radial-gradient(55% 70% at 100% 92%, rgba(232, 60, 44, 0.8), rgba(232, 60, 44, 0) 70%),
    radial-gradient(45% 60% at 58% 62%, rgba(110, 190, 70, 0.4), rgba(110, 190, 70, 0) 72%),
    #14100c;
}

.work-spread.is-adeptai {
  background:
    radial-gradient(60% 75% at 88% 20%, rgba(30, 220, 200, 0.8), rgba(30, 220, 200, 0) 70%),
    radial-gradient(55% 70% at 100% 90%, rgba(40, 110, 220, 0.7), rgba(40, 110, 220, 0) 70%),
    radial-gradient(45% 60% at 58% 58%, rgba(20, 150, 160, 0.38), rgba(20, 150, 160, 0) 72%),
    #0a1214;
}

.work-spread.is-cozmece {
  background:
    radial-gradient(60% 75% at 88% 20%, rgba(224, 176, 104, 0.8), rgba(224, 176, 104, 0) 70%),
    radial-gradient(55% 70% at 100% 90%, rgba(150, 84, 48, 0.8), rgba(150, 84, 48, 0) 70%),
    radial-gradient(45% 60% at 58% 58%, rgba(240, 226, 196, 0.28), rgba(240, 226, 196, 0) 72%),
    #12100d;
}

.work-spread.is-photo {
  width: 100%;
  -webkit-mask-image: none;
  mask-image: none;
}

.work-spread.is-photo::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(12, 12, 12, 0.7) 0%, rgba(12, 12, 12, 0.15) 60%, rgba(12, 12, 12, 0) 100%),
    linear-gradient(180deg, rgba(12, 12, 12, 0.35) 0%, rgba(12, 12, 12, 0) 35%, rgba(12, 12, 12, 0.78) 100%);
  opacity: 1;
}

.work-spread.is-photo img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

@media (max-width: 767px) {
  .work-spread,
  .work-spread.is-photo {
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 75%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 75%);
  }
}

/* App art: generated pieces scattered along the right ~40% of the card */
.work-spread.is-sizzleai,
.work-spread.is-adeptai,
.work-spread.is-cozmece,
.work-spread.is-stickpaw,
.work-spread.is-utilities {
  width: 44%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: auto 100%;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.5) 30%, #000 65%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.5) 30%, #000 65%);
}

.work-spread.is-sizzleai {
  background-image: url("../../images/work/sizzleai-spread.jpg");
}

.work-spread.is-adeptai {
  background-image: url("../../images/work/adeptai-spread.jpg");
}

.work-spread.is-cozmece {
  background-image: url("../../images/work/cozmece-spread.jpg");
}

.work-spread.is-stickpaw {
  background-image: url("../../images/work/stickpaw-spread.jpg");
  /* White sticker borders read brighter than the other cards' art. */
  filter: brightness(0.72);
}

.work-spread.is-utilities {
  background-image: url("../../images/work/utilities-spread.jpg");
}

.work-spread.is-sizzleai::after,
.work-spread.is-adeptai::after,
.work-spread.is-cozmece::after,
.work-spread.is-stickpaw::after,
.work-spread.is-utilities::after {
  content: none;
}

@media (max-width: 767px) {
  .work-spread.is-sizzleai,
  .work-spread.is-adeptai,
  .work-spread.is-cozmece,
  .work-spread.is-stickpaw,
  .work-spread.is-utilities {
    width: 50%;
  }
}
