/* ==========================================================================
   3Y Enterprise LTD — Corner Brackets Only (Sadece Köşeleri Olan Mizanpaj)
   ========================================================================== */

:root {
  --bg-page: #FAF9F6;
  --navy: #0E2852;
  --text-main: #121417;
  --text-secondary: #525660;
  --text-faint: #8E9098;
  --border-line: rgba(14, 40, 82, 0.09);
  --bracket-color: rgba(14, 40, 82, 0.25);
  --accent-green: #059669;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', monospace;
  --max-width: 1240px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

html, body {
  height: 100%;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Strictly no scroll on desktop */
body {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Subtle Film Grain / Paper Texture Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.085;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Open Frame: No full border, only corner brackets */
.corner-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  height: 100%;
  max-height: 860px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 44px 20px;
}

/* ==========================================================================
   The 4 Subtle Corner Brackets (Sadece Köşeler)
   ========================================================================== */

.corner-bracket {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
}

.cb-tl {
  top: 0;
  left: 0;
  border-top: 1.5px solid var(--bracket-color);
  border-left: 1.5px solid var(--bracket-color);
  animation: drawBracketTL 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

.cb-tr {
  top: 0;
  right: 0;
  border-top: 1.5px solid var(--bracket-color);
  border-right: 1.5px solid var(--bracket-color);
  animation: drawBracketTR 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

.cb-bl {
  bottom: 0;
  left: 0;
  border-bottom: 1.5px solid var(--bracket-color);
  border-left: 1.5px solid var(--bracket-color);
  animation: drawBracketBL 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

.cb-br {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid var(--bracket-color);
  border-right: 1.5px solid var(--bracket-color);
  animation: drawBracketBR 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

/* ==========================================================================
   Content Layout (Clean & Open)
   ========================================================================== */

/* 1. Header: Logo Top-Left */
.frame-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: none;
  padding-bottom: 0;
  animation: revealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.14s backwards;
}

.header-brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: clamp(140px, 18vh, 175px);
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-logo:hover,
.header-brand:hover .brand-logo {
  opacity: 0.92;
  transform: scale(1.01);
}

/* Header Status: Pure Typographic / Kutusuz (No Box / No Border) */
.header-status.unboxed-status {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.status-pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}

.dot-core {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  z-index: 2;
}

.dot-wave {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--accent-green);
  opacity: 0.6;
  animation: pulse-ring 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.4);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.hub-item {
  color: var(--navy);
  font-weight: 600;
  transition: color 0.15s ease;
  cursor: default;
}

.hub-item:hover {
  color: #D92228;
}

.hub-item.is-hq {
  font-weight: 700;
}

.hq-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.hub-sep {
  color: rgba(14, 40, 82, 0.25);
  font-size: 0.72rem;
  font-weight: 300;
  user-select: none;
}


/* 2. Center Content (Calm, moderate typography — NOT huge) */
.frame-main {
  padding: 20px 0;
  max-width: 800px;
  margin: auto 0;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 16px;
  animation: revealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.26s backwards;
}

.main-heading {
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 14px;
  animation: revealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.36s backwards;
}

.main-desc {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 660px;
  margin-bottom: 0;
  animation: revealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards;
}

/* 3. Bottom Ledger */
.frame-footer {
  border-top: 1px solid var(--border-line);
  padding-top: 22px;
  animation: revealFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.58s backwards;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 20px;
}

.ledger-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-col:nth-child(1) {
  animation: revealFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.64s backwards;
}

.ledger-col:nth-child(2) {
  animation: revealFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.72s backwards;
}

.ledger-col:nth-child(3) {
  animation: revealFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.80s backwards;
}

.col-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.col-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
}

.col-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gov-link,
.doc-trigger {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2.5px;
  text-decoration-color: rgba(14, 40, 82, 0.35);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.gov-link:hover,
.doc-trigger:hover {
  color: #D92228;
  text-decoration-color: #D92228;
}

.btn-copy {
  align-self: flex-start;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.btn-copy:hover {
  color: #D92228;
}

.baseline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-line);
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  gap: 16px;
  animation: revealFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.88s backwards;
}

.baseline-channels {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.channel-link {
  color: #D92228;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.channel-link:hover {
  opacity: 0.82;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.channel-sep {
  color: var(--border-line);
  font-size: 0.6rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--navy);
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Certificate of Incorporation Modal (Flush White Document / No Scroll)
   ========================================================================== */

body.modal-open {
  overflow: hidden !important;
}

.cert-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.cert-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cert-modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(14, 40, 82, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.cert-modal-dialog {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: min(92vw, 440px);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border: 1px solid rgba(14, 40, 82, 0.16);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transform: scale(0.96) translateY(6px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-transform: scale(0.96) translateY(6px) translateZ(0);
}

.cert-modal.active .cert-modal-dialog {
  transform: scale(1) translateY(0);
  -webkit-transform: scale(1) translateY(0) translateZ(0);
}

.cert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(14, 40, 82, 0.08);
  background-color: #FFFFFF;
  flex-shrink: 0;
  box-sizing: border-box;
}

.cert-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cert-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  line-height: 1.2;
  white-space: nowrap;
}

.cert-modal-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.cert-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.cert-action-link {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 2.5px 7px;
  border: 1px solid rgba(14, 40, 82, 0.12);
  border-radius: 4px;
  background-color: rgba(14, 40, 82, 0.03);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cert-action-link:hover {
  color: var(--navy);
  border-color: rgba(14, 40, 82, 0.25);
  background-color: rgba(14, 40, 82, 0.08);
}

.cert-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-secondary);
  padding: 0 3px;
  margin-left: 2px;
  transition: color 0.15s ease;
}

.cert-modal-close:hover {
  color: #D92228;
}

.cert-modal-body {
  width: auto;
  max-width: 100%;
  background-color: #FFFFFF;
  padding: 0 0 6px 0;
  margin: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.cert-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 440px);
  max-height: calc(100vh - 68px);
  aspect-ratio: 1236 / 1600;
  object-fit: contain;
  border: none;
  margin: 0 auto;
  padding: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Responsive */
@media (max-width: 860px) {
  .ledger-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 768px), (max-height: 700px) {
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
    padding: 16px;
  }

  .corner-frame {
    height: auto;
    min-height: 100vh;
    padding: 24px 16px;
    gap: 32px;
  }

  .frame-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-status.unboxed-status {
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 0;
  }

  .brand-logo {
    height: clamp(100px, 26vw, 130px);
  }

  .baseline {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .baseline-channels {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .header-status.unboxed-status {
    font-size: 0.68rem;
    gap: 6px 8px;
  }
}

/* ==========================================================================
   Editorial Staggered Entrance Keyframes
   ========================================================================== */

@keyframes revealFadeUp {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawBracketTL {
  0% {
    opacity: 0;
    transform: translate(-6px, -6px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes drawBracketTR {
  0% {
    opacity: 0;
    transform: translate(6px, -6px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes drawBracketBL {
  0% {
    opacity: 0;
    transform: translate(-6px, 6px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes drawBracketBR {
  0% {
    opacity: 0;
    transform: translate(6px, 6px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

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