/**
 * Thaicon Theme — Глобальные стили
 *
 * ПОДХОД: html font-size управляется clamp() — это единственный регулятор
 * масштаба на весь сайт. Все остальные размеры указаны в rem.
 *
 * Дизайн-ширина: 1440px (1rem = 16px на этой ширине)
 * Формула перевода: Tilda_px / 16 = rem
 *
 * @package Thaicon
 */


/* ================================================================
   ГЛАВНЫЙ МЕХАНИЗМ МАСШТАБА
   ================================================================ */

/*
 * На ширине ≥1440 — 1rem = 16px (как в дизайне)
 * От 900px до 1440 — плавное масштабирование от 10px до 16px
 * Ниже 900px (мобайл) — фиксируется 16px, верстка переключается через media query
 *
 * 1.1111vw = 16 / 1440 * 100 (при 1440 даёт ровно 16px)
 */
html {
	font-size: clamp(10px, 1.1111vw, 16px);
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

/* На мобиле возвращаемся к нормальным 16px — верстка переходит на mobile layout */
@media (max-width: 639px) {
	html {
		font-size: 16px;
	}
}


/* ================================================================
   CSS ПЕРЕМЕННЫЕ
   ================================================================ */

:root {
	/* Цвета Thaicon (извлечены из Tilda-источника) */
	--t-dark:          #1d272e;
	--t-dark-muted:    #45545e;
	--t-blue:          #7ea5ba;
	--t-blue-medium:   #59849c;
	--t-blue-light:    #c4d3dd;
	--t-blue-pale:     #e6eef3;
	--t-white:         #ffffff;
	--t-black:         #000000;

	/* Шрифт */
	--t-font-family:   'Arial', 'Helvetica Neue', sans-serif;
	--t-font-heading:  'Arial', 'Helvetica Neue', sans-serif;

	/* Скорости анимации */
	--t-speed-fast:    0.15s;
	--t-speed-normal:  0.2s;
	--t-speed-slow:    0.4s;

	/* Максимальная ширина контейнера */
	--t-max-width:     90rem;  /* 1440px */
}


/* ================================================================
   RESET
   ================================================================ */

*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--t-font-family);
	font-size: 0.9375rem;   /* 15px базовый */
	font-weight: 400;
	line-height: 1.55;
	color: var(--t-dark);
	background: var(--t-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	/* Отступ под фиксированный хедер */
	padding-top: 5rem;       /* 80px */
}

@media (max-width: 639px) {
	body {
		padding-top: 60px;
	}
}

:target,
section[id],
div[id^="section-"] {
	scroll-margin-top: 6.25rem;  /* 100px */
}

@media (max-width: 639px) {
	:target,
	section[id],
	div[id^="section-"] {
		scroll-margin-top: 80px;
	}
}

img, svg, video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--t-speed-normal) ease-in-out;
}

button {
	background: none;
	border: none;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

:focus:not(:focus-visible) { outline: none; }
:focus-visible {
	outline: 2px solid var(--t-blue-medium);
	outline-offset: 2px;
}


/* ================================================================
   ТИПОГРАФИКА
   ================================================================ */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--t-font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--t-dark);
}

h1 { font-size: 3rem; }          /* 48px */
h2 {
	font-size: 2.1875rem;          /* 35px */
	text-transform: uppercase;
}
h3 { font-size: 1.5rem; }        /* 24px */

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


/* ================================================================
   UTILITY-КЛАССЫ
   ================================================================ */

.container {
	max-width: var(--t-max-width);
	margin: 0 auto;
	padding: 0 1.25rem;     /* 20px */
}

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hide-mobile  { display: block; }
.hide-desktop { display: none; }

@media (max-width: 959px) {
	.hide-mobile  { display: none; }
	.hide-desktop { display: block; }
}
