:root {
  --color-body: #ffffff;
  --color-surface: #f5f7fa; /* input arka planı, kart bg */
  --color-text: #333333;
  --color-text-muted: #8b95a1; /* placeholder, label */

  --color-primary: #014281;
  --color-primary-dark: #012f5a;
  --color-primary-light: #e8f0f9; /* focus ring, hover bg */

  --color-secondary: #fe8f1c;
  --color-secondary-dark: #c66b15;

  --color-border: #c8cdd6; /* input border normal */
}

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;

  background-color: var(--color-body);
  color: var(--color-text);
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
  max-width: 1024px;
  width: 100%;
  margin-inline: auto;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--color-primary);
}

.page-subtitle {
  font-size: clamp(1.5rem, 2vw, 1.8rem);
  color: var(--color-text-muted);
}

.page-title-wrapper {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid;
  border-image: linear-gradient(
      to right,
      transparent,
      var(--color-secondary),
      transparent
    )
    1;
}

.main-wrapper {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  background-color: var(--color-surface);
}

.form-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  width: 100%;
  align-items: center;
  column-gap: 3rem;
  row-gap: 3rem;
}

.form-wrapper form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sertifika-image {
  width: 100%;
  max-width: 600px;
}

.field-wrap {
  position: relative;
}

.field-wrap input {
  padding: 22px 16px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  width: 100%;
}

.field-wrap label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-text);
  transition:
    top 0.18s ease,
    font-size 0.18s ease;
}

/* label yukarı kayma durumu */
.field-wrap input:focus + label,
.field-wrap input:not(:placeholder-shown) + label {
  top: 10px;
  transform: none;
  font-size: 11px;
}

.btn {
  padding: 12px 24px;
  background-color: #ececec;
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.btn.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn.btn-primary:active {
  transform: translateY(-2px);
}

.figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
}

.sertifika-preview {
  position: relative;
  display: block; /* figure default inline */
  margin: 0;
}

.sertifika-preview img {
  width: 100%;
  display: block;
}

#isim-overlay {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Great Vibes', cursive;
  color: #7a1a2e;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.figcaption {
  text-align: center;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: var(--color-text-muted);
  margin-top: 6px;
}

.ios-note {
  display: block;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: var(--color-text-muted);
  margin-top: 6px;
}

#onizleme-canvas {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes onAutoFillStart {
  from {}
}

input:-webkit-autofill {
  animation-name: onAutoFillStart;
  animation-duration: 0.001s;
}

@media screen and (max-width: 768px) {
  .form-wrapper {
    grid-template-columns: 1fr;
  }

  .main-wrapper {
    padding: 1rem;
  }
}

.test {
  font-family: "Great Vibes", cursive;
  font-size: 48px;
}
