/* =========================================================================
   ig.css — instagram /accounts/login replica
   metrics mirror the live page: 350px card, 38px inputs, 32px buttons,
   8px radius primary, 175x51 wordmark, #dbdbdb hairlines, #fafafa fields
   ========================================================================= */

@font-face {
  font-family: 'IG Wordmark';
  src: url('/assets/fonts/GrandHotel-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ig-border: #dbdbdb;
  --ig-text: #262626;
  --ig-sub: #737373;
  --ig-muted: #8e8e8e;
  --ig-link: #00376b;
  --ig-blue: #0095f6;
  --ig-blue-off: #4cb5f9;
  --ig-field: #fafafa;
  --ig-fb: #385185;
  --ig-red: #ed4956;
  --ig-page: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--ig-page);
  color: var(--ig-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body.ig-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ig-main {
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 44px;
}

.ig-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 350px;
  margin-top: 32px;
}

/* ------------------------------------------------------------- login card */

.ig-card {
  width: 350px;
  background: #fff;
  border: 1px solid var(--ig-border);
  border-radius: 1px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ig-logo {
  margin: 36px auto 12px;
  height: 51px;
  width: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-indent: -9999px;
  overflow: hidden;
  background-image: url('/assets/wordmark.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.ig-logo span { display: none; }

/* fallback: webfont wordmark (used when svg is unavailable) */
.ig-logo--font {
  background: none;
  text-indent: 0;
  overflow: visible;
  font-family: 'IG Wordmark', 'Segoe Script', cursive;
  font-size: 42px;
  line-height: 51px;
  font-weight: 400;
  color: var(--ig-text);
  letter-spacing: 0.5px;
  padding-top: 2px;
}
.ig-logo--font span { display: inline; }

.ig-form {
  width: 100%;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
}

.ig-field {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}

.ig-input {
  width: 100%;
  height: 38px;
  padding: 9px 8px 7px;
  font-size: 16px;
  line-height: 20px;
  font-family: inherit;
  color: var(--ig-text);
  background: var(--ig-field);
  border: 1px solid var(--ig-border);
  border-radius: 3px;
  transition: border-color 0.1s ease-out;
  appearance: none;
}
.ig-input:focus {
  outline: none;
  border-color: #a8a8a8;
  background: #fff;
}
.ig-input::placeholder { color: transparent; }

.ig-label {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #8e8e8e;
  pointer-events: none;
  transition: transform 0.1s ease-out, font-size 0.1s ease-out, top 0.1s ease-out;
  transform-origin: left top;
  max-width: calc(100% - 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.ig-field.is-filled .ig-label,
.ig-input:focus + .ig-label {
  top: 8px;
  transform: none;
  font-size: 10px;
}
.ig-field.is-filled .ig-input,
.ig-input:focus { padding-top: 14px; padding-bottom: 2px; }

/* primary button */
.ig-btn {
  position: relative;
  width: 100%;
  height: 32px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--ig-blue-off);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  cursor: default;
  transition: background 0.1s ease-out;
  overflow: hidden;
}
.ig-btn.is-ready {
  background: var(--ig-blue);
  cursor: pointer;
}
.ig-btn.is-ready:hover { background: #1877f2; }
.ig-btn.is-ready:active { background: #0068c9; }
.ig-btn[data-busy='1'] { color: transparent; }
.ig-btn[data-busy='1']::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ig-spin 0.7s linear infinite;
}
@keyframes ig-spin { to { transform: rotate(360deg); } }

/* OR divider */
.ig-or {
  display: flex;
  align-items: center;
  margin: 10px 40px 18px;
  width: calc(100% - 80px);
}
.ig-or::before,
.ig-or::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--ig-border);
}
.ig-or span {
  margin: 0 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 15px;
  color: var(--ig-muted);
}

.ig-fb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 80px);
  height: 32px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ig-fb);
}
.ig-fb svg { width: 16px; height: 16px; flex: 0 0 auto; }

.ig-forgot {
  display: block;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--ig-link);
  text-decoration: none;
  text-align: center;
}
.ig-forgot:hover { text-decoration: underline; }

.ig-error {
  display: none;
  margin: 0 40px 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 18px;
  color: var(--ig-text);
  background: #ed4956;
  color: #fff;
  border-radius: 8px;
  text-align: center;
}
.ig-error.is-on { display: block; }

/* ------------------------------------------------------------ signup card */

.ig-card--signup {
  margin-top: 10px;
  padding: 20px 0;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
}
.ig-card--signup a {
  color: var(--ig-blue);
  font-weight: 600;
  text-decoration: none;
}
.ig-card--signup a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- app row */

.ig-apps {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  width: 100%;
}
.ig-apps p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 18px;
  color: var(--ig-text);
}
.ig-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.ig-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 136px;
  height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  text-decoration: none;
}
.ig-badge svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ig-badge b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 14px;
}
.ig-badge small {
  display: block;
  font-size: 8px;
  line-height: 9px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------------------------------------------------------------- footer */

.ig-footer {
  flex: 0 0 auto;
  padding: 0 16px 52px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ig-muted);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.ig-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}
.ig-footer-links a {
  color: var(--ig-muted);
  text-decoration: none;
}
.ig-footer-links a:hover { text-decoration: underline; }
.ig-footer-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 460px) {
  .ig-main { padding-bottom: 0; }
  .ig-shell { margin-top: 0; max-width: 100%; }
  .ig-card {
    width: 100%;
    border: 0;
    padding: 4px 0 22px;
    background: #fff;
  }
  .ig-card--signup { padding: 18px 0; border: 0; }
  .ig-form { padding: 0 16px; }
  .ig-or { margin: 10px 16px 18px; width: calc(100% - 32px); }
  .ig-fb { width: calc(100% - 16px); }
  .ig-logo { margin: 22px auto 14px; width: 158px; background-size: contain; }
  .ig-logo--font { font-size: 38px; }
  .ig-apps { margin-top: 26px; }
  .ig-footer { padding: 12px 16px 32px; font-size: 11px; }
  .ig-footer-links { gap: 6px 10px; }
}
