/* ==========================================================================
   Kristal Nargile — geçici karşılama sayfası
   Görsel kararların tamamı aşağıdaki değişkenlerde. Önce buradan değiştirin.
   ========================================================================== */

@font-face {
  font-family: "Tinos";
  src: url("../fonts/tinos-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Renk — kartvizitin koyu yüzü */
  --c-bg: #171A1D;                 /* antrasit */
  --c-fg: #F7F8F8;                 /* kırık beyaz */
  --c-muted: rgb(247 248 248 / 0.66);
  --c-copper: #8C6551;             /* kartvizitteki bakır (CMYK 36/71/82/36) */
  --c-copper-hi: #D9B9A4;          /* ışık, parıltı, odak halkası */
  --c-line: rgb(140 101 81 / 0.62);

  --c-logo: var(--c-copper);
  --c-btn-bg: var(--c-fg);
  --c-btn-fg: var(--c-bg);

  /* Tipografi */
  --font-serif: "Tinos", "Nimbus Roman No9 L", "Times New Roman", Times, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-title: clamp(2.6rem, 1.35rem + 3.6vw, 5.25rem);
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);

  /* Çerçeve (kartvizitin yuvarlatılmış kenarı) */
  --frame-inset: clamp(12px, 2.2vw, 32px);
  --frame-radius: clamp(20px, 2.8vw, 40px);
  --frame-border: 1.5px;
  --light-size: 340px;             /* kenar ışığının yarıçapı */
  --c-light: #F1DCCD;              /* kenar ışığının rengi */

  /* Yerleşim */
  --logo-h: clamp(280px, 58vh, 580px);
  --col-gap: clamp(48px, 7vw, 128px);
  --rule-w: 2px;
  --content-max: 33rem;

  /* Buton */
  --btn-h: 56px;
  --btn-radius: 12px;

  /* Hareket */
  --ease: cubic-bezier(0.22, 0.7, 0.12, 1);
  --t-intro: 1100ms;
}

/* Açık tema — kartvizitin beyaz yüzü. Denemek için <html data-theme="light"> */
:root[data-theme="light"] {
  --c-bg: #F7F8F8;
  --c-fg: #171A1D;
  --c-muted: rgb(23 26 29 / 0.68);
  --c-line: rgb(23 26 29 / 0.5);
  --c-copper-hi: #8C6551;
  --c-light: #8C6551;
  --c-logo: #171A1D;
}

/* ---------- Temel ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Çerçeve boşluğu body'nin padding'i: margin, body'den taşıp (margin collapse)
   sayfayı ekran yüksekliğinden uzun yapıyordu. */
body {
  margin: 0;
  padding: var(--frame-inset);
  min-height: 100vh;
  min-height: 100svh;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--c-copper-hi);
  outline-offset: 4px;
}

/* ---------- Çerçeve ---------- */

.frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 2 * var(--frame-inset));
  min-height: calc(100svh - 2 * var(--frame-inset));
  padding: clamp(40px, 6vw, 96px) clamp(24px, 6vw, 96px);
  border: var(--frame-border) solid var(--c-line);
  border-radius: var(--frame-radius);
  isolation: isolate;
}

/* İmlecin yakınında parlayan kenar */
.frame__light {
  position: absolute;
  inset: calc(-1 * var(--frame-border));
  border: var(--frame-border) solid var(--c-light);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease);
  -webkit-mask-image: radial-gradient(var(--light-size) circle at var(--px, 50%) var(--py, 50%), #000 0%, rgb(0 0 0 / 0.45) 35%, transparent 75%);
  mask-image: radial-gradient(var(--light-size) circle at var(--px, 50%) var(--py, 50%), #000 0%, rgb(0 0 0 / 0.45) 35%, transparent 75%);
}

.is-lit .frame__light { opacity: 1; }

/* ---------- Izgara: logo | ayraç | içerik ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rule-w) minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: center;
  width: min(100%, 1200px);
}

.brand {
  justify-self: center;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.logo {
  display: block;
  height: var(--logo-h);
  width: auto;
  aspect-ratio: 758 / 1296;
  color: var(--c-logo);
  overflow: visible;
}

.logo__sheen-stop { stop-color: var(--c-copper-hi); }

.rule {
  position: relative;
  width: var(--rule-w);
  height: calc(var(--logo-h) * 0.92);
  border-radius: var(--rule-w);
  background: var(--c-copper);
  overflow: hidden;
}

/* Ayraç da aynı ışığı alır (görüntü alanına sabitlenmiş degrade) */
.rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(calc(var(--light-size) * 0.8) circle at var(--gx, -999px) var(--gy, -999px), var(--c-light), transparent 70%) fixed;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.is-lit .rule::after { opacity: 1; }

.content {
  justify-self: start;
  max-width: var(--content-max);
}

/* ---------- Tipografi ---------- */

.title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-title);
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.lead {
  margin: clamp(20px, 2.2vw, 32px) 0 0;
  max-width: 30ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--c-muted);
  text-wrap: pretty;
}

/* ---------- Bağlantılar ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 36px;
  margin-top: clamp(32px, 3.6vw, 48px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: var(--btn-h);
  padding: 0 22px 0 20px;
  border-radius: var(--btn-radius);
  background: var(--c-btn-bg);
  color: var(--c-btn-fg);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 250ms var(--ease), transform 250ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn__arrow {
  transition: transform 300ms var(--ease);
}

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

.contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--c-fg);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.contact svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--c-copper-hi);
}

.contact__text {
  display: inline-flex;
  flex-wrap: wrap;
  column-gap: 10px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 350ms var(--ease);
}

.contact__label { font-weight: 500; }

.contact__value {
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #fff; }
  .btn:hover .btn__arrow { transform: translateX(4px); }
  .contact:hover .contact__text { background-size: 100% 1px; }
}

:root[data-theme="light"] .btn:hover { background: #000; }

/* ---------- Açılış ---------- */

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes reveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

.frame         { animation: fade 900ms var(--ease) both; }
.rule          { animation: grow var(--t-intro) var(--ease) 150ms both; }
.logo          { animation: reveal 1300ms var(--ease) 200ms both; }
.title         { animation: rise 900ms var(--ease) 550ms both; }
.lead          { animation: rise 900ms var(--ease) 680ms both; }
.actions       { animation: rise 900ms var(--ease) 800ms both; }

/* Elmas parıltısı: SVG içindeki degrade elmasın üzerinden bir kez geçer.
   Zamanlaması main.js'te (GLINT_DELAY), süresi index.html'de (#sheen-anim dur). */
.logo__sheen { pointer-events: none; }

/* ---------- Mobil / dar ekran: alt alta ---------- */

@media (max-width: 860px) {
  :root {
    --logo-h: clamp(180px, 31svh, 320px);
  }

  .frame {
    padding: clamp(40px, 9vw, 64px) clamp(20px, 6vw, 40px);
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(28px, 5svh, 44px);
    justify-items: center;
    text-align: center;
  }

  .rule {
    width: 56px;
    height: var(--rule-w);
  }

  @keyframes grow { from { transform: scaleX(0); } }

  .content {
    justify-self: center;
  }

  .lead {
    margin-inline: auto;
  }

  .actions {
    flex-direction: column;
    gap: 16px;
  }

  .btn {
    width: 100%;
    max-width: 340px;
    justify-content: center;
  }
}

/* Alçak yatay ekranlar (dizüstü, yatay telefon) */
@media (min-width: 861px) and (max-height: 640px) {
  :root { --logo-h: clamp(220px, 70vh, 440px); }
  .frame { padding-block: 20px; }
}

/* ---------- Hareketi azalt ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .logo__sheen { display: none; }
}

/* ---------- Yazdırma ---------- */

@media print {
  .frame__light,
  .logo__sheen { display: none; }
}
