// Business template styles
// Customize the CSS custom properties below to match your brand.
// Fonts are loaded from Google Fonts via config.toml [extra] heading_font / body_font.

:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-alpha-20: rgba(37, 99, 235, 0.2);
  --primary-alpha-10: rgba(37, 99, 235, 0.1);

  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-light: #FB923C;

  --background: #F8FAFC;
  --background-alt: #F1F5F9;
  --background-raised: #FFFFFF;
  --color: #0F172A;
  --color-muted: #475569;
  --border-color: rgba(37, 99, 235, 0.12);

  --hero-bg: #1E3A5F;
  --hero-text: #FFFFFF;
  --hero-muted: rgba(255, 255, 255, 0.9);

  --max-width: 1200px;
}

// Breakpoints
$phone-max-width: 683px;
$tablet-max-width: 899px;

// Skip link (accessibility)
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;

  &:focus {
    top: 0;
  }
}

// Reset
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;

  @media (prefers-reduced-motion: reduce) {
    scroll-behavior: auto;
  }
}
*, *:before, *:after { box-sizing: inherit; }

// Base
body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--color);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

// Typography
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font, -apple-system, BlinkMacSystemFont, sans-serif);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
  &:hover { color: var(--primary-light); }
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

p { margin-bottom: 16px; }

// Shared section layout
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;

  @media (max-width: $phone-max-width) {
    padding: 0 20px;
  }
}

.section-heading {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 12px;
  color: var(--color);

  @media (max-width: $phone-max-width) {
    font-size: 1.6rem;
  }
}

.section-subheading {
  text-align: center;
  color: var(--color-muted);
  font-size: 1.1rem;
  margin: 0 0 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;

  @media (max-width: $phone-max-width) {
    font-size: 1rem;
    margin-bottom: 32px;
  }
}

// ========================================
// Navbar
// ========================================
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);

  &__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;

    @media (max-width: $phone-max-width) {
      padding: 0 16px;
      gap: 8px;
    }
  }

  &__logo {
    font-size: 1.3rem;
    font-family: var(--heading-font, sans-serif);
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    color: var(--primary);

    &-img {
      width: 40px;
      height: 40px;
      object-fit: contain;
      vertical-align: middle;
      margin-right: 8px;
      border-radius: 8px;
    }
  }

  &__links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    margin-right: auto;
    padding: 0;
    padding-left: 32px;

    @media (max-width: $tablet-max-width) {
      flex-direction: column;
      gap: 8px;
      margin: 0;
      padding: 0;
    }

    li a {
      color: var(--color-muted);
      font-size: 0.95rem;
      font-weight: 600;
      padding: 6px 0;
      transition: color 0.2s ease;

      @media (max-width: $tablet-max-width) {
        padding: 12px 16px;
        display: block;
      }

      &:hover {
        color: var(--primary);
      }
    }
  }

  &__toggle-input {
    display: none;
  }

  &__hamburger {
    display: none;

    @media (max-width: $tablet-max-width) {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 44px;
      height: 44px;
      padding: 12px 10px;
      cursor: pointer;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      transition: border-color 0.2s ease;
      margin-left: auto;
      margin-right: 8px;
      flex-shrink: 0;

      span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--color-muted);
        border-radius: 1px;
        transition: transform 0.2s ease, opacity 0.2s ease;
      }

      &:hover {
        border-color: var(--primary);
      }
    }
  }

  &__toggle-input:checked ~ &__hamburger {
    span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    span:nth-child(2) { opacity: 0; }
    span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  }

  &__menu {
    display: contents;

    @media (max-width: $tablet-max-width) {
      display: none;
      position: absolute;
      top: 64px;
      left: 0;
      right: 0;
      background: var(--background);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
      flex-direction: column;
      gap: 16px;
      padding: 20px;
      z-index: 99;
    }
  }

  &__toggle-input:checked ~ &__menu {
    @media (max-width: $tablet-max-width) {
      display: flex;
    }
  }
}

// ========================================
// Main
// ========================================
.main {
  flex: 1;
}

// ========================================
// Hero
// ========================================
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 80px 40px;
  overflow: hidden;
  background: var(--hero-bg);

  @media (max-width: $tablet-max-width) {
    padding: 60px 40px;
  }

  @media (max-width: $phone-max-width) {
    padding: 40px 20px;
    min-height: auto;
  }

  &__inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 60px;

    @media (max-width: $tablet-max-width) {
      flex-direction: column;
      text-align: center;
      gap: 40px;
    }
  }

  &__text {
    flex: 1;
  }

  &__title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    color: var(--hero-text);

    br { display: block; }
  }

  &__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--hero-muted);
    margin: 20px 0 0;
    font-weight: 400;
    max-width: 500px;
    line-height: 1.6;

    @media (max-width: $tablet-max-width) {
      margin-left: auto;
      margin-right: auto;
    }
  }

  &__cta {
    display: inline-block;
    margin-top: 32px;
    padding: 14px 36px;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--heading-font, sans-serif);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);

    &:hover {
      background: var(--accent-hover);
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    }
  }

  &__image {
    flex-shrink: 0;

    @media (max-width: $tablet-max-width) {
      max-width: 320px;
    }
  }

  &__image-img {
    width: 380px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);

    @media (max-width: $tablet-max-width) {
      width: 100%;
      max-width: 320px;
    }

    @media (max-width: $phone-max-width) {
      max-width: 260px;
    }
  }
}

// ========================================
// Services
// ========================================
.services {
  padding: 80px 0;
  background: var(--background);

  @media (max-width: $phone-max-width) {
    padding: 48px 0;
  }

  &__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;

    @media (max-width: $tablet-max-width) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: $phone-max-width) {
      grid-template-columns: 1fr;
    }
  }
}

.service-card {
  padding: 32px;
  background: var(--background-raised);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;

  &:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }

  &__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-alpha-10);
    border-radius: 12px;
    margin-bottom: 16px;
    color: var(--primary);

    svg {
      width: 26px;
      height: 26px;
    }
  }

  &__name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color);
    margin: 0 0 8px;
  }

  &__desc {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin: 0 0 16px;
    line-height: 1.6;
  }

  &__price {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
  }
}

// ========================================
// Steps (How It Works)
// ========================================
.steps {
  padding: 80px 0;
  background: var(--background-alt);

  @media (max-width: $phone-max-width) {
    padding: 48px 0;
  }

  &__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;

    @media (max-width: $phone-max-width) {
      grid-template-columns: 1fr;
      max-width: 400px;
      margin: 0 auto;
    }
  }
}

.step {
  text-align: center;

  &__number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--heading-font, sans-serif);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px var(--primary-alpha-20);
  }

  &__title {
    font-size: 1.2rem;
    margin: 0 0 8px;
    color: var(--color);
  }

  &__desc {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.6;
  }
}

// ========================================
// About
// ========================================
.about {
  padding: 80px 0;
  background: var(--background);

  @media (max-width: $phone-max-width) {
    padding: 48px 0;
  }

  &__avatar {
    text-align: center;
    margin-bottom: 24px;
  }

  &__avatar-img {
    width: 180px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  &__content {
    max-width: 640px;
    margin: 24px auto 0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-muted);

    p:last-child {
      margin-bottom: 0;
    }
  }
}

// ========================================
// Contact
// ========================================
.contact {
  padding: 80px 0;
  background: var(--primary);
  text-align: center;

  @media (max-width: $phone-max-width) {
    padding: 48px 0;
  }

  &__heading {
    font-size: 2rem;
    color: var(--hero-text);
    margin: 0 0 12px;

    @media (max-width: $phone-max-width) {
      font-size: 1.6rem;
    }
  }

  &__subheading {
    color: var(--hero-muted);
    font-size: 1.1rem;
    margin: 0 0 48px;

    @media (max-width: $phone-max-width) {
      font-size: 1rem;
      margin-bottom: 32px;
    }
  }

  &__form {
    max-width: 480px;
    margin: 0 auto 48px;
    text-align: left;
  }

  &__field {
    margin-bottom: 16px;

    label {
      display: block;
      font-size: 0.9rem;
      font-weight: 700;
      margin-bottom: 6px;
      color: #fff;
      font-family: var(--heading-font, sans-serif);
    }

    input, textarea {
      width: 100%;
      padding: 12px 16px;
      font-size: 1rem;
      font-family: var(--body-font, sans-serif);
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.15);
      color: #fff;
      transition: border-color 0.2s ease, background 0.2s ease;

      &::placeholder {
        color: rgba(255, 255, 255, 0.5);
      }

      &:focus {
        outline: none;
        border-color: var(--accent);
        background: rgba(255, 255, 255, 0.2);
      }
    }

    textarea {
      resize: vertical;
    }
  }

  &__submit {
    display: inline-block;
    width: 100%;
    padding: 14px 36px;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--heading-font, sans-serif);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);

    &:hover:not(:disabled) {
      background: var(--accent-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    }

    &:disabled {
      opacity: 0.7;
      cursor: not-allowed;
    }
  }

  &__feedback {
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 600;

    &--success {
      color: #86EFAC;
    }

    &--error {
      color: #FCA5A5;
    }
  }

  &__methods {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;

    @media (max-width: $phone-max-width) {
      flex-direction: column;
      align-items: center;
      gap: 24px;
    }
  }

  &__method {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--hero-text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: color 0.2s ease;

    svg {
      width: 24px;
      height: 24px;
      color: #FFFFFF;
      flex-shrink: 0;
    }

    &:hover {
      color: var(--accent-light);
    }
  }
}

// ========================================
// Extra content
// ========================================
.extra-content {
  padding: 60px 0;
  background: var(--background);

  .section-inner {
    max-width: 720px;
    font-size: 1.05rem;
    line-height: 1.7;
  }
}

// ========================================
// Page content (standalone pages)
// ========================================
.page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 40px;

  @media (max-width: $phone-max-width) {
    padding: 40px 20px;
  }

  &__title {
    color: var(--primary);
    margin: 0 0 24px;
  }

  &__body {
    font-size: 1.1rem;
    line-height: 1.7;
  }
}

// ========================================
// Footer
// ========================================
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--background-alt);
  color: var(--color-muted);

  &__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 40px;

    @media (max-width: $phone-max-width) {
      padding: 24px 20px;
    }
  }

  &__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    @media (max-width: $phone-max-width) {
      flex-direction: column;
      text-align: center;
    }
  }

  &__contact {
    font-size: 0.875rem;

    a {
      color: var(--color-muted);
      padding: 8px 0;
      display: inline-block;
      &:hover { color: var(--primary); }
    }
  }

  &__sep {
    margin: 0 8px;
  }

  .copyright {
    font-size: 0.875rem;

    a {
      color: var(--color-muted);
      padding: 8px 0;
      display: inline-block;
      &:hover { color: var(--primary); }
    }
  }
}
