/* ============================================================
   canberke.com pre-launch
   Duotone: #000001 / #F7F7F7 only; intermediate shades via alpha.
   Display face: system stack (SF Pro Display on Apple devices), body: system stack.
   Shape system: sharp (radius 0) everywhere.
   Brand motif: the square (wordmark dot, caret, bullets, checkbox,
   error markers, button square, success frame).
   ============================================================ */

:root {
  color-scheme: light dark;

  --bg: #F7F7F7;
  --text: #000001;
  --text-muted: rgba(0, 0, 1, 0.62);
  --border: rgba(0, 0, 1, 0.12);
  --line: rgba(0, 0, 1, 0.3);
  --ring: rgba(0, 0, 1, 0.22);

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000001;
    --text: #F7F7F7;
    --text-muted: rgba(247, 247, 247, 0.62);
    --border: rgba(247, 247, 247, 0.16);
    --line: rgba(247, 247, 247, 0.34);
    --ring: rgba(247, 247, 247, 0.25);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Anchor targets clear the sticky menubar. */
  scroll-padding-top: 4.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.page {
  max-width: 41rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem 3.5rem;
}

/* ---------- Grain (fixed, static, non-interactive) ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='160'%20height='160'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .grain {
    opacity: 0.07;
    mix-blend-mode: screen;
  }
}

/* ---------- Top menubar (sticky, translucent theme bg) ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 247, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .topnav {
    background: rgba(0, 0, 1, 0.82);
  }
}

.topnav-list {
  margin: 0;
  padding: 0 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 4vw, 2rem);
}

/* Square separators between links (brand motif). */
.topnav-list li {
  display: flex;
  align-items: center;
}

.topnav-list li + li::before {
  content: "";
  width: 0.2rem;
  height: 0.2rem;
  background: var(--line);
  margin-right: clamp(1.1rem, 4vw, 2rem);
}

.topnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.15rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.topnav-link:hover,
.topnav-link[aria-current="true"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}

/* ---------- Masthead: centered wordmark ---------- */

.masthead {
  text-align: center;
  margin-bottom: clamp(3rem, 9vw, 4.5rem);
}

.wordmark {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.wm-dot {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--text);
  margin: 0 0.09em 0 0.11em;
  transition: transform 0.3s var(--ease-out);
}

.wordmark:hover .wm-dot {
  transform: scale(1.5);
}

.wm-tld {
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 10vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

/* Word masks for the entrance rise. */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.w-inner {
  display: inline-block;
}

/* The caret: "this page is still being written". */
.caret {
  display: inline-block;
  width: 0.4em;
  height: 0.62em;
  background: var(--text);
  margin-left: 0.16em;
}

@media (prefers-reduced-motion: no-preference) {
  .caret {
    animation: blink 1.15s steps(1) infinite;
  }
}

@keyframes blink {
  0%, 55% {
    opacity: 1;
  }
  56%, 100% {
    opacity: 0;
  }
}

.hero-sub {
  margin: 0;
  max-width: 46ch;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ---------- Form ---------- */

#signup-form {
  margin-top: clamp(2.5rem, 6vw, 3.25rem);
  display: grid;
  gap: 1.75rem;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

#signup-form.is-hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.control {
  position: relative;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 0.4rem 0 0.65rem;
  font: inherit;
  font-size: 1.25rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.field input:focus {
  outline: none;
}

/* Focus line draws from the left on focus. */
.focus-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
  pointer-events: none;
}

.field:focus-within .focus-line {
  transform: scaleX(1);
}

/* Duotone-safe autofill. */
.field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.field-error {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.field-error::before {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--text);
}

.field.has-error input[type="text"],
.field.has-error input[type="email"] {
  border-bottom-color: var(--text);
}

/* Honeypot: moved off-screen, invisible to humans, present for bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consent: custom square checkbox (brand motif). */
.consent {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 400;
}

.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.18rem 0 0;
  display: inline-grid;
  place-content: center;
  background: transparent;
  border: 1px solid var(--text);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.consent input[type="checkbox"]::after {
  content: "";
  width: 0.3rem;
  height: 0.58rem;
  margin-top: -0.1rem;
  border-right: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform 0.18s var(--ease-out), opacity 0.18s var(--ease-out);
}

.consent input[type="checkbox"]:checked {
  background: var(--text);
}

.consent input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.consent span {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Submit: sharp bar, fill wipes up on hover, label inverts
   through the wipe via blend-difference. */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.4rem;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.005em;
  transition: transform 0.35s var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn-label,
.btn-square {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
  color: #fff;
}

.btn-square {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  background: #fff;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover .btn-square {
  transform: translateX(5px);
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn.is-submitting .btn-square {
  animation: blink 1s steps(1) infinite;
}

.form-status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-status::before {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--text);
}

/* ---------- Success panel ---------- */

.success {
  margin-top: clamp(2.5rem, 6vw, 3.25rem);
  padding: 2.75rem 2rem;
  text-align: center;
  border: 1px solid var(--text);
  border-radius: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.success:focus {
  outline: none;
}

.success.is-visible {
  opacity: 1;
  transform: none;
}

.success-check {
  width: 56px;
  height: 56px;
  margin-bottom: 1.1rem;
}

.check-frame {
  stroke: var(--text);
  stroke-width: 2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.check-mark {
  stroke: var(--text);
  stroke-width: 3;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
}

.success.is-visible .check-frame {
  animation: draw 0.8s var(--ease-out) 0.05s forwards;
}

.success.is-visible .check-mark {
  animation: draw 0.45s var(--ease-out) 0.7s forwards;
}

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

.success-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.success-message {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */

.section {
  margin-top: clamp(5rem, 13vw, 7.5rem);
}

.section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.about-text {
  margin: 0;
  max-width: 62ch;
  color: var(--text-muted);
}

.value-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2rem;
}

.value-list li {
  position: relative;
  padding-left: 1.75rem;
}

.value-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--text);
}

.value-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.value-list span {
  display: block;
  max-width: 56ch;
  color: var(--text-muted);
}

/* ---------- İş Birliği ---------- */

.h2-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.8rem;
  vertical-align: 0.25em;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.h2-tag::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  background: var(--line);
}

.collab-text {
  margin: 0 0 2rem;
  max-width: 62ch;
  color: var(--text-muted);
}

.collab-list {
  gap: 0.9rem;
}

.collab-list li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.collab-list li::before {
  top: 0.5em;
}

.collab-en {
  margin: 2rem 0 0;
  max-width: 58ch;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.collab-cta {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.collab-btn {
  width: auto;
  display: inline-flex;
  gap: 1.4rem;
  padding: 0.95rem 1.3rem;
  color: var(--text);
  text-decoration: none;
}

.collab-email {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  -webkit-user-select: all;
  user-select: all;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: clamp(5rem, 13vw, 7.5rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.social {
  display: flex;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.social-link {
  display: inline-flex;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.25s var(--ease-out);
}

.social-link:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.footer-note {
  margin: 0 0 0.6rem;
  max-width: 58ch;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- Entrance choreography (load) ----------
   Gated behind html.js so content is never hidden if scripts
   fail, and behind prefers-reduced-motion: no-preference. */

@media (prefers-reduced-motion: no-preference) {
  .js .intro {
    animation: rise 0.7s var(--ease-out) both;
    animation-delay: var(--d, 0s);
  }

  .js .w-inner {
    transform: translateY(112%);
    animation: rise-word 0.85s var(--ease-out) forwards;
    animation-delay: var(--d, 0s);
  }
}

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

@keyframes rise-word {
  to {
    transform: translateY(0);
  }
}

/* ---------- Scroll reveal (below the fold) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal .stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.js .reveal.is-visible .stagger > * {
  opacity: 1;
  transform: none;
}

.js .reveal.is-visible .stagger > *:nth-child(1) {
  transition-delay: 0.08s;
}

.js .reveal.is-visible .stagger > *:nth-child(2) {
  transition-delay: 0.18s;
}

.js .reveal.is-visible .stagger > *:nth-child(3) {
  transition-delay: 0.28s;
}

/* ---------- Reduced motion: everything settles instantly ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal .stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #signup-form,
  .success,
  .btn,
  .btn::before,
  .btn-square,
  .focus-line,
  .social-link,
  .wm-dot,
  .consent input[type="checkbox"],
  .consent input[type="checkbox"]::after {
    transition: none;
  }

  .success {
    opacity: 1;
    transform: none;
  }

  .success.is-visible .check-frame,
  .success.is-visible .check-mark,
  .btn.is-submitting .btn-square {
    animation: none;
    stroke-dashoffset: 0;
  }

  .btn:hover,
  .btn:hover .btn-square,
  .social-link:hover,
  .wordmark:hover .wm-dot {
    transform: none;
  }
}
