:root {
  --ink: #0c0c0c;
  --muted: #8c8c8c;
  --paper: #ffffff;
  --line: #e4e4e4;
  --accent: #bc4c28;
  --bronze: #a48255;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  overflow-x: hidden;
}

body.intro-running {
  overflow: hidden;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   OBYS-INSPIRED FULLSCREEN BLACK PRELOADER + RIGHT-EDGE 00 -> 100
   ================================================================ */
.obys-preloader {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 40;
  transition: opacity 0.12s linear;
}

.preloader-counter {
  position: fixed;
  right: clamp(1rem, 2.2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  z-index: 75;
  user-select: none;
}

/* Obys clip-mask upward text reveal */
.mask-line {
  display: block;
  overflow: hidden;
}

.mask-line > span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transform: translate3d(0, 112%, 0);
  opacity: 0;
  transition:
    transform 0.92s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
    opacity 0.55s ease var(--d, 0s);
}

body.intro-done .mask-line > span {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* ================================================================
   EDITORIAL TOP HEADER (OBYS MONOCHROME GRID)
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(0.9rem, 1.8vw, 1.5rem) clamp(1rem, 2.4vw, 2.2rem);
  pointer-events: none;
}

.site-header a,
.site-header nav {
  pointer-events: auto;
}

.wordmark {
  font-size: clamp(2.1rem, 4.1vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.88;
  color: var(--ink);
}

.wordmark i {
  font-style: normal;
  color: var(--accent);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  max-width: 24rem;
}

.header-bar > span {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 2rem);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.25vw, 1.15rem);
}

.site-header nav a {
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-color: var(--ink);
}

.studio-clock {
  color: #555555;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.header-contact {
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
  white-space: nowrap;
}

.header-contact:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.header-bio {
  margin-top: 1.05rem;
  font-size: 0.81rem;
  line-height: 1.44;
  color: #222222;
}

.header-bio p {
  margin: 0;
}

.header-bio .bio-meta {
  margin-top: 0.55rem;
  color: #666666;
}

.header-bio .bio-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

/* Hide bio cleanly on subpages so subpage headers have plenty of room */
body.is-subpage .header-bio {
  display: none;
}

body.is-subpage .site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  align-items: center;
}

body.is-subpage .wordmark {
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
}

/* ================================================================
   PURE-WHITE OBYS ENTRANCE STAGE WITH CENTERED 3D SCULPTURAL "K"
   ================================================================ */
.page[hidden] {
  display: none;
}

.page {
  min-height: 65vh;
}

.obys-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  background: #ffffff;
  overflow: hidden;
}

/* Frameless pure white 3D canvas — lifts above #000 curtain during intro! */
.logo3d-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 2;
}

body.intro-running .logo3d-stage {
  position: fixed;
  z-index: 60;
}

#kotyeri-logo-3d {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: grab;
}

#kotyeri-logo-3d:active {
  cursor: grabbing;
}

.logo3d-static-fallback {
  display: none;
  max-height: 54vh;
  max-width: 70vw;
  object-fit: contain;
}

.logo3d-stage.logo3d-fallback #kotyeri-logo-3d {
  display: none;
}

.logo3d-stage.logo3d-fallback .logo3d-static-fallback {
  display: block;
}

/* Obys-inspired architectural center brackets flanking the 3D K */
.obys-brackets {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24rem, 36vw, 34rem);
  pointer-events: none;
  z-index: 5;
  color: #0c0c0c;
  opacity: 0.96;
  transition: color 0.45s ease, gap 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

body.intro-running .obys-brackets {
  position: fixed;
  z-index: 50;
  color: #ffffff;
  gap: clamp(10rem, 18vw, 15rem);
}

body.intro-done .obys-brackets {
  color: #0c0c0c;
  gap: clamp(24rem, 36vw, 34rem);
}

.bracket {
  width: clamp(34px, 4vw, 54px);
  height: clamp(135px, 24vh, 210px);
  will-change: transform;
}

/* Pinned Obys side navigation & minimal controls */
.obys-ui {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.obys-index {
  position: absolute;
  left: clamp(1rem, 2.4vw, 2.2rem);
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.84rem;
}

.obys-index a {
  pointer-events: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: rgba(12, 12, 12, 0.34);
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
}

.obys-index a em {
  font-style: normal;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.obys-index a:hover,
.obys-index a:focus-visible {
  color: var(--ink);
  transform: translateX(4px);
}

.obys-controls {
  position: absolute;
  right: clamp(1rem, 2.4vw, 2.2rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.obys-btn {
  pointer-events: auto;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.44rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #d4d4d4;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.obys-btn:hover {
  border-color: var(--ink);
}

.obys-btn:active {
  transform: scale(0.97);
}

.obys-btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.obys-btn-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.obys-btn[aria-pressed="true"]:not(.obys-btn-dark) {
  border-color: var(--ink);
  background: #f5f5f5;
}

.obys-textbtn {
  pointer-events: auto;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0.15rem 0;
  color: #555555;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.obys-textbtn:hover {
  color: var(--ink);
}

.obys-hint {
  font-size: 0.74rem;
  color: #8c8c8c;
  letter-spacing: 0.02em;
}

.obys-bottom {
  position: absolute;
  left: clamp(1rem, 2.4vw, 2.2rem);
  right: clamp(1rem, 2.4vw, 2.2rem);
  bottom: clamp(1rem, 2vw, 1.6rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.obys-scroll {
  pointer-events: auto;
  font-weight: 600;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}

.obys-scroll:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.obys-copy {
  color: #9a9a9a;
}

/* ================================================================
   PORTAL CARDS SECTION BELOW PURE-WHITE 3D K ENTRANCE
   ================================================================ */
.portals-wrap {
  width: min(94%, 1540px);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) 0 0;
}

.portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.portal {
  position: relative;
  height: clamp(320px, 46vh, 520px);
  overflow: hidden;
  background: #1b1b1b;
  color: white;
}

.portal img,
.studio-photo img,
.about img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal img {
  transition: transform 0.7s;
}

.portal:hover img,
.portal:focus-visible img {
  transform: scale(1.08) translate(var(--pan-x, 0px), var(--pan-y, 0px));
}

.portal div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.1rem, 2.2vw, 2.5rem);
  background: linear-gradient(0deg, #0b0e0be0, transparent 78%);
  transition: padding-bottom 0.45s;
}

.portal:hover div,
.portal:focus-visible div {
  padding-bottom: clamp(1.6rem, 3.2vw, 3.2rem);
}

.portal h2 {
  font-size: clamp(2.2rem, 3.8vw, 4.6rem);
  letter-spacing: -0.06em;
  font-weight: 500;
  margin: 0.15rem 0 0.6rem;
  line-height: 1;
}

.portal p {
  margin: 0;
  border-top: 1px solid #fff8;
  padding-top: 0.7rem;
  font-size: 0.95rem;
}

/* ================================================================
   SUB-PAGES (EĞİTİM, MAĞAZA, STÜDYO, HAKKINDA)
   ================================================================ */
.subpage {
  width: min(94%, 1540px);
  margin: 0 auto;
  padding-top: clamp(4.8rem, 7vw, 6.2rem);
  animation: enter 0.35s ease-out;
}

.kicker,
small,
figcaption {
  font-size: 0.89rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 650;
  margin: 0 0 0.7rem;
}

.intro {
  position: relative;
  isolation: isolate;
  padding: clamp(2rem, 4vw, 3.8rem) 0 2rem;
}

.intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.085em;
  line-height: 0.93;
  margin: 0;
  font-size: clamp(3.4rem, 7.6vw, 7.8rem);
}

.intro h1 span,
.brand span {
  color: var(--accent);
}

.section-art {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: min(35%, 32rem);
  right: 0;
  bottom: 1rem;
  color: var(--bronze);
  opacity: 0.52;
  stroke-width: 1.5;
}

.section-art path,
#sheet rect {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: pencil 1.55s cubic-bezier(0.25, 0.7, 0.3, 1) backwards;
}

.split,
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 6rem);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.textpanel {
  max-width: 42rem;
}

.textpanel h2,
.about h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 3.3vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 400;
  margin: 0.9rem 0;
}

.textpanel p,
.about p {
  line-height: 1.55;
  max-width: 58ch;
}

.filters,
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.filters {
  justify-content: flex-start;
}

.filters button,
.action,
select,
textarea {
  font: inherit;
}

.filters button {
  background: transparent;
  border: 1px solid #c4c4c4;
  border-radius: 2rem;
  padding: 0.48rem 0.85rem;
  color: inherit;
  cursor: pointer;
}

.filters button[aria-pressed="true"],
.action {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.lesson {
  margin: 1.5rem 0;
  border-block: 1px solid var(--line);
  padding: 0.8rem 0;
}

.lesson h3 {
  margin: 0.4rem 0;
}

.textlink {
  text-decoration: underline;
  text-underline-offset: 0.25em;
  display: block;
  width: fit-content;
  margin: 1rem 0;
}

.modelpanel {
  background-color: #f3f2ed;
  background-image: radial-gradient(#c6c4ba 1px, transparent 1px);
  background-size: 15px 15px;
  padding: 1rem;
}

.modelpanel canvas {
  width: 100%;
  height: auto;
}

#model {
  touch-action: pan-y;
  cursor: grab;
}

#model:active {
  cursor: grabbing;
}

.tools {
  background: #f3f2ed;
  padding: 0.8rem 0;
  border-top: 1px solid #d4d2c8;
}

.tools input {
  vertical-align: middle;
  accent-color: #19231e;
}

.blueprint,
.studio-photo {
  margin: 0;
}

.blueprint {
  background-color: #133f40;
  background-image:
    linear-gradient(#c6ded014 1px, transparent 1px),
    linear-gradient(90deg, #c6ded014 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 1rem;
  color: #e3ece3;
}

#sheet {
  width: 100%;
  display: block;
}

#sheet rect {
  fill: #184648;
  stroke: #ebdfba;
  stroke-width: 1.9;
  animation-duration: 1s;
}

#sheet text {
  fill: #f2eddc;
  font: 17px Georgia, serif;
}

.blueprint figcaption {
  border-top: 1px solid #688581;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

#replay {
  font: inherit;
  border: 1px solid #809a94;
  background: #17393a;
  color: #fff;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.action {
  cursor: pointer;
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 0.2rem;
  font-weight: 600;
}

.status {
  color: #704723;
}

.studio-photo img {
  max-height: 29rem;
  display: block;
}

.studio-photo figcaption {
  margin-top: 0.5rem;
}

select,
textarea {
  display: block;
  margin: 0.4rem 0 1rem;
  width: 100%;
  border: 1px solid #c8c8c8;
  background: #ffffff;
  color: var(--ink);
  border-radius: 3px;
  padding: 0.7rem;
}

textarea {
  resize: vertical;
}

.about {
  align-items: center;
}

.about img.full-logo {
  height: auto;
  max-height: 26rem;
  object-fit: contain;
}

.about h2 {
  max-width: 18ch;
}

/* Footer */
.site-footer {
  width: min(94%, 1540px);
  margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--ink);
  padding: 1.3rem 0;
  font-size: 0.88rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.07em;
  font-size: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  background: white;
  padding: 0.8rem;
  z-index: 90;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pencil {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */
@media (max-width: 820px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .header-right {
    align-items: flex-start;
    text-align: left;
    max-width: none;
    width: 100%;
  }
  .header-bar > span {
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }
  .header-bio {
    display: none;
  }
  .obys-brackets {
    gap: clamp(13rem, 62vw, 22rem);
  }
  .bracket {
    width: 22px;
    height: 92px;
  }
  .obys-index {
    display: none;
  }
  .obys-controls {
    top: auto;
    bottom: 3.9rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem 0.7rem;
  }
  .obys-bottom {
    justify-content: center;
  }
  .obys-copy {
    display: none;
  }
  .portals {
    grid-template-columns: 1fr;
  }
  .portal {
    height: 15rem;
  }
  .split,
  .about {
    grid-template-columns: 1fr;
  }
  .modelpanel,
  .blueprint {
    grid-row: 1;
  }
  .site-footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .mask-line > span {
    transform: none !important;
    opacity: 1 !important;
  }
}
