/*
  getwid.app (PROJECT.md §6.22). Uygulamanın görsel dili: beyaz defter ızgarası (48 pt, %10 gri — onboarding'deki
  `PaywallNotebookGridBackground`), Ubuntu yazı tipi, siyah kapsül düğme ve logonun üç rengi. Tek gösterişli öğe
  ana sayfadaki kart destesi: logodaki üç kart canlı widget olarak; gerisi sade.
*/

@font-face {
  font-family: "Ubuntu";
  src: url("fonts/ubuntu-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu";
  src: url("fonts/ubuntu-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("fonts/sora-light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("fonts/sora-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --ink-soft: #6e6e73;
  --grid: rgba(128, 128, 128, 0.1);
  --rule: rgba(0, 0, 0, 0.12);
  /* Logodan örneklenen marka renkleri (`SignInLogoMark`). */
  --amber: #ffbe0b;
  --blue: #3a86ff;
  --pink: #ff006e;
  --cell: 48px;
  --page: 1152px;
  --gutter: 24px;
  /* Japonca ve Korece Ubuntu'da yok: sistem yazı tipine düşer. */
  --font: "Ubuntu", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans JP",
    "Noto Sans KR", system-ui, sans-serif;
  --font-widget: "Sora", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Apple SD Gothic Neo", system-ui,
    sans-serif;
  color-scheme: light;
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

/* Izgara çizgileri sayfanın ortasından geçer; 1152 px'lik içerik 24 kareye tam oturur. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 18px/1.5 var(--font);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: calc(50% + 24px) 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

a {
  color: inherit;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Üst bar ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 96px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: auto;
}

/* Dil seçimi yalnızca betik çalışınca anlamlı (metinleri o değiştiriyor). */
.lang {
  display: none;
}

.js .lang {
  display: inline-flex;
}

.lang select {
  appearance: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 9px 38px 9px 16px;
  cursor: pointer;
}

/* ---- Düğmeler ---- */

/* Uygulamadaki `PrimaryButton`: siyah kapsül, beyaz yazı. */
.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease;
}

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

.text-link {
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Giriş ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  align-items: center;
  gap: var(--cell);
  padding-block: var(--cell) calc(var(--cell) * 2);
}

.hero h1,
.page-head h1 {
  margin: 0 0 24px;
  font-size: clamp(44px, 6.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
  /* Almancadaki gibi uzun bileşik sözcük sütunu taşırmasın. */
  overflow-wrap: break-word;
}

.lead {
  margin: 0 0 32px;
  max-width: 32em;
  font-size: 20px;
  line-height: 1.5;
}

.note {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---- Kart destesi: logo canlı widget'lar olarak ----
   Konumlar logodaki dizilim: sarı kart arkada sağ üstte, mavi solda, pembe önde ve düz. Ölçüler destenin
   genişliğine oranlı (cqw); widget köşe yarıçapı her boyutta aynı, iOS'taki gibi. */

.deck {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / 0.9;
  margin-inline: auto;
  container-type: inline-size;
}

.card {
  position: absolute;
  border-radius: 6.5cqw;
  padding: 5.2cqw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translate(0, 0) rotate(var(--angle));
}

.card-blue {
  --angle: -10deg;
  left: 3cqw;
  top: 13cqw;
  width: 42cqw;
  height: 42cqw;
  background: var(--blue);
  color: var(--paper);
  z-index: 1;
}

.card-amber {
  --angle: 12deg;
  left: 52cqw;
  top: 3cqw;
  width: 42cqw;
  height: 42cqw;
  background: var(--amber);
  color: var(--ink);
  z-index: 0;
}

.card-pink {
  --angle: 0deg;
  left: 7cqw;
  top: 49cqw;
  width: 86cqw;
  height: 38cqw;
  background: var(--pink);
  color: var(--paper);
  z-index: 2;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
}

/* Açılış: kartlar pembenin arkasında üst üste başlar, bir kez yelpazelenip yerine oturur. Betik yoksa ya da
   hareket azaltıldıysa doğrudan son hâl. */
.js .deck:not(.is-open) .card-blue {
  transform: translate(26cqw, 30cqw) rotate(0deg);
}

.js .deck:not(.is-open) .card-amber {
  transform: translate(-23cqw, 30cqw) rotate(0deg);
}

.js .deck:not(.is-open) .card-pink {
  transform: translate(0, 2cqw) rotate(0deg);
}

.deck.is-open .card-amber {
  transition-delay: 90ms;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .store {
    transition: none;
  }
}

.w-label {
  font-size: 4.4cqw;
  font-weight: 700;
  line-height: 1.2;
}

.w-number {
  font-family: var(--font-widget);
  font-weight: 600;
  font-size: 15cqw;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.w-unit {
  font-size: 4.4cqw;
  line-height: 1.2;
}

/* Saat: üstte saat, altta gün ve tarih. */
.card-blue .w-time {
  display: flex;
  align-items: baseline;
  gap: 1.4cqw;
  font-family: var(--font-widget);
  font-weight: 600;
  /* Küçük kartın iç genişliği 31.6cqw: 24 saatlik "21:05" ve "오후"/"PM" ekiyle de sığsın. */
  font-size: 9.5cqw;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.card-blue .w-period {
  font-size: 4.4cqw;
  letter-spacing: 0;
}

.card-blue .w-day {
  margin-top: auto;
  font-size: 4.6cqw;
  font-weight: 700;
  line-height: 1.2;
}

.card-blue .w-date {
  font-family: var(--font-widget);
  font-weight: 300;
  font-size: 4.4cqw;
  line-height: 1.3;
}

/* Geri sayım: etiket üstte (iki satıra kayabilir), sayı altta; üçü kartın iç yüksekliğine sığar. */
.card-amber .w-number {
  margin-top: auto;
  font-size: 14cqw;
}

/* Geçen süre: solda etiket ve sayı, sağda kalp. */
.card-pink .w-since {
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
}

.card-pink .w-count {
  display: flex;
  align-items: baseline;
  gap: 2cqw;
}

.card-pink .w-number {
  font-size: 13.5cqw;
}

.card-pink .w-heart {
  width: 11cqw;
  height: 11cqw;
  flex: none;
  fill: currentColor;
  opacity: 0.9;
}

/* ---- Özellikler ---- */

.section {
  padding-block: calc(var(--cell) * 2);
}

.section h2 {
  margin: 0 0 var(--cell);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cell) calc(var(--cell) * 1.5);
}

.feature-list h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-list p {
  margin: 0;
  max-width: 30em;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ---- Sorular ve destek ---- */

.faq-list {
  max-width: 46em;
  border-top: 1px solid var(--rule);
}

.faq-list details {
  border-bottom: 1px solid var(--rule);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

/* Artı işareti; açılınca çarpıya döner (yanıt veren tek hareket). */
.faq-list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform 200ms ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list .answer {
  padding: 0 0 24px;
  color: var(--ink-soft);
  font-size: 17px;
}

.faq-list .answer p {
  margin: 0;
}

.faq-list ol,
.faq-list ul {
  margin: 0;
  padding-left: 1.4em;
}

.faq-list li + li {
  margin-top: 6px;
}

.faq-list strong {
  color: var(--ink);
  font-weight: 700;
}

.section-more {
  margin: var(--cell) 0 0;
}

.section-more .text-link {
  font-size: 17px;
  font-weight: 700;
}

/* Ok altı çizgisiz: satır içi blok, bağlantının alt çizgisini almaz. */
.section-more [aria-hidden] {
  display: inline-block;
}

/* ---- Yenilikler ----
   Liste `hosting/scripts/build-releases.py` ile üretilir. Her sürüm bir satır: solda numara ve tarih (5 kare), sağda
   notlar; kutu yok, sürümler arasında ince çizgi. Numara kartlardaki rakamlar gibi Sora. Düzeltmeler SSS'nin açılır
   listesiyle (`faq-list`). */

.page-head {
  padding-block: var(--cell) calc(var(--cell) * 1.5);
}

.release {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 19fr);
  gap: var(--cell);
  padding-block: var(--cell);
  border-top: 1px solid var(--rule);
}

.release-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.release-version {
  margin: 0;
  font-family: var(--font-widget);
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.release-date {
  font-size: 15px;
  color: var(--ink-soft);
}

.release-badge {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--amber);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.release-summary {
  margin: 0 0 32px;
  max-width: 32em;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.release-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.release-list h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
}

.release-list p {
  margin: 0;
  max-width: 40em;
  color: var(--ink-soft);
  font-size: 17px;
}

.release-fixes {
  margin-top: 36px;
}

.releases-since {
  margin: 0;
  padding-block: var(--cell) calc(var(--cell) * 2);
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---- Yasal metinler (/privacy, /terms) ----
   Uzun okuma: satır 46em'de kalır, gövde yazısı tam siyah (soluk gri uzun metni yorar). Başlık tanıtım sayfalarından
   küçük. */

.legal .page-head {
  padding-bottom: var(--cell);
}

.legal .page-head h1 {
  margin-bottom: 12px;
  font-size: clamp(36px, 5vw, 60px);
}

.legal-updated {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.legal-note {
  margin: var(--cell) 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.legal-body {
  max-width: 46em;
  padding-bottom: calc(var(--cell) * 2);
  font-size: 17px;
  line-height: 1.65;
}

.legal-body section + section {
  margin-top: 40px;
}

.legal-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.legal-body p,
.legal-body ul,
.legal-body ol {
  margin: 0 0 12px;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.3em;
}

.legal-body li + li {
  margin-top: 6px;
}

.legal-body section > :last-child {
  margin-bottom: 0;
}

.legal-body a {
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ---- Alt bilgi ---- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: var(--cell);
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-soft);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer p {
  margin: 0;
}

.brand-small {
  font-size: 17px;
  gap: 10px;
}

.brand-small img {
  width: 26px;
}

/* ---- Davet ve 404: tek mesajlı sayfalar, ortalı ---- */

.message-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: var(--cell) calc(var(--cell) * 2);
}

.message-page .mark {
  width: 120px;
  height: auto;
  margin-bottom: 32px;
}

.message-page h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  word-break: break-word;
}

.message-page p {
  margin: 0 0 8px;
  max-width: 26em;
  font-size: 19px;
}

.message-page .soft {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 32px;
}

.message-page .text-link {
  margin-top: 20px;
}

/* ---- Dar ekran ---- */

@media (max-width: 1040px) {
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --gutter: 20px;
  }

  .site-header {
    height: 72px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 16px 72px;
  }

  .lead {
    font-size: 18px;
  }

  .deck {
    width: min(100%, 440px);
  }

  .section {
    padding-block: 64px;
  }

  .feature-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .faq-list summary {
    font-size: 17px;
    padding: 18px 0;
  }

  .page-head {
    padding-block: 16px 40px;
  }

  /* Numara, tarih ve etiket notların üstünde tek satır. */
  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 40px;
  }

  .release-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
  }

  .release-version {
    font-size: 44px;
  }

  .release-summary {
    margin-bottom: 24px;
    font-size: 20px;
  }

  .legal-note {
    margin-top: 16px;
  }

  .legal .page-head {
    padding-bottom: 32px;
  }

  .legal-body {
    font-size: 16px;
  }

  .store {
    width: 100%;
  }

  .message-page .store {
    width: auto;
  }
}
