@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600;7..72,700&display=swap");

:root {
  --ink: #030609;
  --muted: #303735;
  --green: #0a844a;
  --deep: #085834;
  --white: #ffffff;
  --soft: #e7f2ec;
  --line: #d8deda;
  --shadow: 0 28px 80px rgba(3, 6, 9, 0.1);
  --tight: 0 14px 36px rgba(3, 6, 9, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--white);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(216, 222, 218, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 222, 218, 0.28) 1px, transparent 1px),
    #ffffff;
  background-size: 72px 72px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Literata", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.home-shell,
.card-shell {
  width: min(100% - 28px, 760px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 34px 0;
}

.brand-panel,
.contact-card,
.editor-panel,
.cards-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(231, 242, 236, 0.9);
  box-shadow: var(--shadow);
}

.brand-panel {
  width: min(100%, 620px);
  padding: clamp(28px, 6vw, 58px);
  text-align: center;
}

.brand-wordmark {
  width: 190px;
  margin: 0 auto 40px;
}

.brand-panel h1 {
  font-size: clamp(44px, 10vw, 82px);
  line-height: 0.95;
}

.brand-panel p {
  max-width: 460px;
  margin: 20px auto 0;
  color: rgba(48, 55, 53, 0.82);
  font-size: 18px;
  line-height: 1.55;
}

.primary-action,
.ghost-action {
  min-height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.primary-action {
  margin-top: 28px;
  padding: 0 24px;
  background: var(--green);
  color: var(--white);
  box-shadow: 0 18px 40px rgba(10, 132, 74, 0.24);
}

.ghost-action {
  padding: 0 18px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

.contact-card {
  width: min(100%, 620px);
  min-height: 720px;
  padding: clamp(26px, 6vw, 54px);
  display: flex;
  flex-direction: column;
}

.corner-symbol {
  position: absolute;
  top: -80px;
  right: -85px;
  width: min(340px, 70vw);
  opacity: 0.12;
  pointer-events: none;
}

.card-brand img {
  width: 156px;
}

.avatar-wrap {
  width: 168px;
  height: 168px;
  margin-top: 54px;
  border-radius: 30px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--tight);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.contact-main {
  margin-top: auto;
}

.avatar-wrap + .contact-main {
  margin-top: 38px;
}

.kicker {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-main h1 {
  font-size: clamp(44px, 10vw, 76px);
  line-height: 0.98;
}

.position {
  margin-top: 16px;
  color: rgba(48, 55, 53, 0.82);
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.35;
}

.contact-actions {
  margin-top: 34px;
  display: grid;
  gap: 12px;
}

.contact-link {
  min-height: 82px;
  border-radius: 22px;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(3, 6, 9, 0.035);
}

.contact-link span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.contact-link b {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(17px, 4vw, 21px);
  overflow-wrap: anywhere;
}

.social-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(3, 6, 9, 0.035);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.social-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.social-button path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vcf-action {
  width: 100%;
}

.site-action {
  width: 100%;
}

.card-footer {
  margin-top: 22px;
  color: rgba(48, 55, 53, 0.7);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-shell {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.admin-header {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  background: rgba(231, 242, 236, 0.86);
  box-shadow: var(--tight);
}

.admin-logo img {
  width: 146px;
}

.admin-header span {
  color: rgba(48, 55, 53, 0.78);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  gap: 22px;
  align-items: start;
}

.editor-panel,
.cards-panel {
  padding: clamp(22px, 4vw, 36px);
}

.editor-panel {
  display: grid;
  gap: 16px;
}

.optional-group {
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.44);
}

.optional-group .kicker {
  margin-bottom: 0;
}

.checkbox-row {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.48);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: var(--green);
}

.checkbox-row span {
  letter-spacing: 0;
  text-transform: none;
}

.editor-panel h1,
.cards-heading h2 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

label small,
.form-status {
  color: rgba(48, 55, 53, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  outline: 0;
}

input[type="file"] {
  min-height: auto;
  padding: 13px 14px;
}

input:focus {
  border-color: rgba(10, 132, 74, 0.56);
  box-shadow: 0 0 0 5px rgba(10, 132, 74, 0.08);
}

.editor-panel .primary-action {
  width: 100%;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.form-actions .primary-action {
  margin-top: 0;
}

.cards-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.cards-list {
  display: grid;
  gap: 12px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  background: var(--white);
}

.admin-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-card p {
  margin-top: 6px;
  color: rgba(48, 55, 53, 0.78);
  line-height: 1.4;
}

.admin-card a {
  color: var(--green);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-card-actions {
  display: flex;
  align-items: start;
  gap: 8px;
}

.mini-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 13px;
}

.mini-button.danger {
  color: #8f2f1f;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: rgba(48, 55, 53, 0.72);
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 820px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    min-height: 62px;
  }

  .admin-logo img {
    width: 120px;
  }
}

@media (max-width: 560px) {
  .home-shell,
  .card-shell {
    width: min(100% - 24px, 760px);
  }

  .contact-card {
    min-height: calc(100vh - 24px);
    border-radius: 28px;
    padding: 24px;
  }

  .card-brand img {
    width: 132px;
  }

  .avatar-wrap {
    width: 136px;
    height: 136px;
    margin-top: 34px;
    border-radius: 24px;
  }

  .avatar {
    border-radius: 18px;
  }

  .admin-shell {
    width: min(100% - 24px, 1280px);
    padding-top: 18px;
  }

  .admin-header span {
    display: none;
  }

  .cards-heading,
  .admin-card {
    grid-template-columns: 1fr;
  }

  .cards-heading {
    display: grid;
  }

  .admin-card-actions {
    flex-wrap: wrap;
  }

  .social-actions {
    grid-template-columns: 1fr;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }
}
