:root {
  --main-black: #232323;
  --gray-block: #f6f6f6;
  --border: #e5e5e5;
  --radius: 18px;
  --accent-green: #70bb64;
  --highlight-green: #bbf7d0;

  /* layout */
  --page-padding: clamp(16px, 5vw, 32px);

  /* unified buttons */
  --btn-h: 48px;
  --btn-pad-x: 28px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 250px;
  background: #fff;
  color: var(--main-black);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  line-height: 1.68;
  min-height: 100vh;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Containers */
header,
section,
footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--page-padding);
}

@supports(padding:max(0px)) {

  header,
  section,
  footer {
    padding-left: max(var(--page-padding), env(safe-area-inset-left));
    padding-right: max(var(--page-padding), env(safe-area-inset-right));
  }
}

/* Headings */
h1,
h2 {
  text-wrap: balance;
}

/* Header */
.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px auto;
}

.header .left,
.header .right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header .right a {
  color: #727272;
  font-weight: 500;
  text-decoration: none;
  transition: color .16s;
}

.header .right a:hover {
  color: var(--accent-green);
}

/* Base email style (overridden below for header only) */
.email {
  color: var(--main-black);
  font-size: 16px;
  font-weight: 600;
}

/* HEADER: адаптивный размер email только в шапке */
.header .left .email {
  font-size: clamp(12px, 3.8vw, 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* ===== Buttons: unified height for ALL ===== */
.btn-light,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  line-height: 1;
  white-space: nowrap;
  border: 1.5px solid var(--main-black);
  border-radius: 100px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  color: var(--main-black);
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, box-shadow .16s, transform .16s;
}

.btn-dark {
  background: var(--main-black);
  color: #fff;
}

.btn-light:hover,
.btn-dark:hover {
  background: #ededed;
  color: var(--main-black);
  border-color: var(--accent-green);
  box-shadow: 0 2px 10px rgba(112, 187, 100, .15);
}

.btn-dark:hover {
  background: var(--accent-green);
  color: #fff;
  border-color: var(--accent-green);
}

/* Основные секции */
section,
footer {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

section {
  margin-bottom: 0 !important;
}

/* Hero */
.hero {
  max-width: 900px;
  padding: 56px 18px 42px;
  border-radius: var(--radius);
  text-align: center;
  position: relative;
}

.hero-arrow {
  position: absolute;
  top: 340px;
  right: -220px;
  width: 500px;
  height: 640px;
  pointer-events: none;
  z-index: 1;
}

.hero .avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 2px solid var(--main-black);
}

.green-text {
  color: var(--accent-green) !important;
  font-size: 4rem;
}

.hero h1 {
  font-size: 3.4rem;
  font-weight: 900;
  margin: 14px 0 18px;
  letter-spacing: -0.035em;
  color: var(--main-black);
  line-height: 1.13;
}

.hero h1 span {
  font-weight: 900;
  color: var(--main-black);
}

.hero p {
  color: #414141;
  font-size: 1.18rem;
  margin-bottom: 34px;
  max-width: 560px;
  line-height: 1.36;
  margin-left: auto;
  margin-right: auto;
}

/* About */
section.about {
  max-width: 850px;
  padding: 0;
  text-align: center;
}

.about h2 {
  font-size: 2.4rem;
  font-weight: 900;
  margin: 0 0 34px;
  line-height: 1.1;
  color: var(--main-black);
}

.about p {
  font-size: 1.16rem;
  color: #474747;
  margin: 0 auto;
  max-width: 700px;
  line-height: 1.62;
}

/* Marker */
.marker {
  background: var(--accent-green);
  border-radius: 20px;
  padding: 0 10px;
  box-decoration-break: clone;
  font-weight: 800;
  color: #fff;
  display: inline;
  white-space: nowrap;
  /* держим фразу на одной строке */
}

/* Services */
.services {
  max-width: 850px;
  text-align: center;
  padding: 0;
}

.services h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0 0 34px;
  line-height: 1.1;
  color: var(--main-black);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 38px;
  justify-items: center;
  width: 100%;
}

.service {
  background: var(--accent-green);
  border-radius: 12px;
  border: 2px solid var(--accent-green);
  padding: 28px 18px;
  min-width: 220px;
  max-width: 320px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  padding: 0 5px;
  margin: 0 0 7px;
  border-radius: 3px;
  box-decoration-break: clone;
}

.service p {
  color: #fff;
  font-size: 1rem;
  margin: 32px 0 0;
}

.service-policy {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.service-policy h3,
.service-policy p {
  flex: 1 1 0;
  min-width: 0;
}

.service-cactus {
  width: 480px;
  height: auto;
  margin-left: 356px;
  margin-top: -400px;
  align-self: flex-start;
  object-fit: contain;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

/* Portfolio */
.portfolio-blocks {
  width: 100%;
  display: flex;
  justify-content: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 38px;
  width: 100%;
  max-width: 1150px;
  justify-items: center;
}

.portfolio-card {
  background: #fff;
  color: #232323;
  border-radius: 14px;
  border: 2.5px solid #fef695;
  padding: 34px 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  max-width: 380px;
}

.portfolio-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #232323;
  margin-bottom: 18px;
  text-align: center;
  width: 100%;
}

.portfolio-card ul {
  list-style: disc inside;
  color: #232323;
  font-size: 1.09rem;
  margin-top: 14px;
  padding-left: 0;
  text-align: left;
}

.portfolio-card ul li {
  margin-bottom: 13px;
  line-height: 1.55;
}

.portfolio-card p {
  color: #343434;
  font-size: 1.09rem;
  margin-bottom: 12px;
  text-align: left;
}

.portfolio-card a {
  color: #232323;
  text-decoration: underline;
}

/* Contact */
.contact {
  text-align: center;
  max-width: 750px;
  position: relative;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.contact-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  width: clamp(140px, 18vw, 260px);
  height: auto;
  opacity: .9;
}

.contact-deco--tl {
  top: -138px;
  left: -8px;
  transform: rotate(-6deg);
}

.contact-deco--br {
  bottom: -18px;
  right: -84px;
  transform: rotate(-40deg);
}

.contact h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0 0 34px;
  color: var(--main-black);
}

.contact p {
  text-align: center !important;
  margin: 0 auto 30px;
  font-size: 1.16rem;
  color: #474747;
  max-width: 600px;
  line-height: 1.62;
}

.contact .buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

/* Footer */
footer {
  background: none;
  box-shadow: none;
  border: none;
  text-align: center;
  padding: 32px 0 18px;
  color: #aaaaaa;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
}

footer p {
  font-size: clamp(12px, 3.4vw, 15px);
  margin: 0;
  text-wrap: balance;
}

footer .links {
  margin: 14px 0 0 0;
  display: flex;
  justify-content: center;
  gap: 14px;
}

footer .links a {
  color: #bbbbbb;
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(12px, 3.2vw, 15px);
  padding: 0 6px;
}

footer .links a:hover {
  color: var(--accent-green);
}

/* Toast */
.toast {
  position: fixed;
  top: 29px;
  left: 50%;
  transform: translateX(-50%) translateY(-36px);
  padding: 10px 50px;
  border-radius: 100px;
  background: #eaf6ea;
  color: var(--accent-green);
  border: 1px solid #d6eed8;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 18px rgba(112, 187, 100, .12);
  transition: opacity .32s, transform .33s;
  letter-spacing: .02em;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ===== Tablets ===== */
@media (max-width: 950px) {
  body {
    gap: 160px;
  }

  header,
  section,
  footer {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column;
  }

  .service-list,
  .portfolio-grid {
    justify-items: center;
    align-items: center;
  }

  .service,
  .portfolio-card {
    align-items: center !important;
    text-align: center !important;
  }

  .contact .buttons {
    justify-content: center;
    align-items: center;
  }
}

/* ===== Mobile ===== */
@media (max-width: 700px) {

  html,
  body {
    overflow-x: hidden;
    gap: 150px;
  }

  .green-text {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  .contact-deco--tl {
    display: none;
  }

  .contact-deco--br {
    display: none;
  }

  header,
  section,
  footer {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-inline: var(--page-padding) !important;
    text-align: center !important;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    width: 100%;
  }

  /* Ссылки сверху, затем email и кнопки */
  .header .right {
    order: 1;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
  }

  .header .left {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .header .left .email {
    text-align: center;
    white-space: nowrap;
  }

  .header .left .actions {
    display: flex;
    gap: 12px;
    width: 100%;
  }

  .header .btn-light,
  .header .btn-dark {
    padding: 0 var(--btn-pad-x);
  }

  .hero {
    padding: 32px 0 24px;
  }

  .hero .avatar {
    width: 120px;
    height: 120px;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 26px;
    max-width: 60ch;
  }

  .service-list,
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    justify-items: stretch;
  }

  .service,
  .portfolio-card {
    width: 100% !important;
    max-width: 680px !important;
    text-align: left !important;
    align-items: flex-start;
    padding: 18px 16px !important;
    border-radius: 14px;
  }

  .portfolio-card p,
  .portfolio-card ul {
    font-size: 1rem;
  }

  /* Кнопки тянутся по ширине, высота единая */
  .btn-dark,
  .btn-light {
    width: 100%;
    padding: 0 var(--btn-pad-x);
  }

  .contact .buttons {
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: stretch;
  }

  .toast {
    padding: 8px 126px;
    font-size: 1rem;
    left: 50%;
  }

  .hero-arrow,
  .service-cactus {
    display: none !important;
  }
}

:root {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  -webkit-touch-callout: none;
}

* {
  -webkit-user-select: inherit;
  -moz-user-select: inherit;
  -ms-user-select: inherit;
  user-select: inherit;

  -webkit-touch-callout: inherit;
}

.email,
input,
textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;

  -webkit-touch-callout: default !important;
  cursor: text;
}